小编Luc*_*cky的帖子

p =*a [0]和p =&a [0]之间有什么区别

#define N 20
int a[2N], i, *p, sum;

p = a;


/* p=a is equivalent to p = *a[0];
• p is assigned 300.
• Pointer arithmetic provides an alternative to array indexing.
• p=a; is equivalent to p=&a[=]; (p is assigned 300)
Run Code Online (Sandbox Code Playgroud)

在这里,我没有得到如何p=*a[0]p=&a[0]相同?*a[0]引用内存地址处的元素.

c arrays pointers

2
推荐指数
1
解决办法
935
查看次数

标签 统计

arrays ×1

c ×1

pointers ×1