当前位置:网站首页>Differences between C language pointer and array A and &a, &a[0], etc
Differences between C language pointer and array A and &a, &a[0], etc
2022-07-24 14:18:00 【Crazy Alex】
Suppose you define an array int a[5]={1,2,3,4,5};
a It represents this array variable
Here's the thing to remember a Equivalent to &a[0] Are the first element of the array a[0] The address of
and &a It means a The first address of the entire array , Although the actual values of the two are the same, they represent different meanings
a+1 It means The address of the first element plus the length of an element , The length of an element is one int type , That is to say
a+size of(int)
&a+1 Represents the first address of the entire array , Add the length of an array , It is &a+5*size of(int)
Suppose you define a int * Variable of type
int *ptr1 = int *(&a+1)
prt[-1] It is equivalent to *(ptr - 1)
边栏推荐
- 天然气潮流计算matlab程序
- Not configured in app.json (uni releases wechat applet)
- CAS atomic type
- bibliometrix: 从千万篇论文中挖掘出最值得读的那一篇!
- mysql
- 茅台冰淇淋“逆势”走红,跨界之意却并不在“卖雪糕”
- SQL Server 启停作业脚本
- The solution to the error of [installation detects that the primary IP address of the system is the address assigned by DHCP] when installing Oracle10g under win7
- Rasa 3.x learning series -rasa [3.2.4] - 2022-07-21 new release
- 数据湖系列文章
猜你喜欢

Matlab program for natural gas flow calculation

Regular expression and bypass cases

After reading this article, I found that my test cases were written in garbage
![The solution to the error of [installation detects that the primary IP address of the system is the address assigned by DHCP] when installing Oracle10g under win7](/img/25/aa9bcb6483bb9aa12ac3730cd87368.png)
The solution to the error of [installation detects that the primary IP address of the system is the address assigned by DHCP] when installing Oracle10g under win7

Maotai ice cream "bucked the trend" and became popular, but its cross-border meaning was not "selling ice cream"
![[untitled] rhcsa first operation](/img/ba/6b9c11edbc18ffb52f6046360b5b10.png)
[untitled] rhcsa first operation

Multithreaded common classes

Uni app background audio will not be played after the screen is turned off or returned to the desktop

Don't lose heart. The famous research on the explosive influence of Yolo and PageRank has been rejected by the CS summit

uni-app 背景音频 熄屏或者退回桌面之后不在播放
随机推荐
电赛设计报告模板及
记不住正则表达式?这里我整理了99个常用正则
TS learning record (I) sudo forgets the password (oolong) try changing the 'lib' compiler option to include 'DOM'
Stack and queue - 20. Valid parentheses
Unity 委托 (Delegate) 的简单理解以及实现
RHCE first operation
SQL server startup and shutdown job script
北京一卡通以35288.8529万元挂牌出让68.45%股权,溢价率为84%
Lazy loading of pictures
Mmdrawercontroller gets the current VC for push and pop
交换
[oauth2] IV. oauth2authorizationrequestredirectfilter
对话框管理器第二章:创建框架窗口
Regular expression and bypass cases
Rasa 3.x 学习系列-Rasa [3.2.4] - 2022-07-21 新版本发布
5年接触近百位老板,身为猎头的我,发现升职的秘密不过4个字
Rasa 3.x learning series -rasa [3.2.3] - new version released on July 18, 2022
CSDN垃圾的没有底线!
exchange
Rhcsa sixth note