Encourage yourself to learn with!
--variables are not necessarily stored in memory in the order they are declared
The-->& operator gets the address of the variable (pointer to the variable)
* operator can get the variable of address
int j=ten;
int *p=&J; Pointer p points to Jint k=*j;
--declaration
int *p;
int* p; Equivalent
int* P,p1; Cannot declare two pointer variable, second variable is int type
- -on the pointer plus n, the pointer forward "the current pointer to the data type length xn"
-- array subscript starting from 0
int array[];
array[0]-array[9] //10 elements
-- arrays and pointers
int array[];
Int
p=array[0
p=array;//pointer p to the array start element address
* (P+i)
P[i]
/* array name [array element]
Array start element address, can be understood as pointer */
array[2];
* (array+2); Both are equivalent
C Language and Pointer learning essays