Pointers and Array representations
int a[10]={1,2,3,4,5,6,7,8,9,10};
int *p;
Among them p=&a[3]; Many books only write p=&a[0];. It is possible to find p=&a[n] through practice.
The array name A is an address that is the address of the No. 0 element of the a array equivalent to &a[0]
If p=&a[0]; P, A and &a[0] three are equivalent; P+2, a+2, &a[0+2] equivalent;
* (p+2), a[2], * (a+2) values are 3 can also be used with the pointer + the underlying representation method such as: P[2] Its value is also 3
Pointer p and array name a plus subscript, and offset can be
The subscript is the element that represents the
add an offset or an address, To access the contents of the address to add *
Note: The pointer p is a variable and the array name A is fixed and cannot be assigned, and the self-adding arithmetic
Start learning the C language pointer