Recently have learned C language in the pointer knowledge, the head is big, vaguely understand half, by himself checked the next information, with you to share the C language pointers in the basic knowledge of it:
1, the pointer is an address, pointing to a type.
2: The pointer points to the address, and the address points to the content.
We need a variable to store the address, the value of this variable is the address, but we can change the value of the variable constantly, but if we need to change the value of that address, we need to modify the value of the address without changing the address.
int a = 10;
int *p;
p = &a;
*p = 11;
A=?
Here we see that p is a variable, we use P to store the address of the variable A, which is, we use *P to assign a value to this variable, then the value of a is finally, how much, the result is 11, because we use the *p assignment, is equivalent to a=11, the same assignment effect.
3: Pointer is a pointer to a variable that is facing the pointer.
We say that when pointers are pointers, it's a bit unclear how to differentiate pointers and pointers.
Char *p;
Char **PR;
PR = &p;
We see it this way, char * (*PR); *PR is a variable that stores values as pointers, and PR is the variable that stores the address of the previous variable. In combination, a PR is a variable that stores the address of a value as a pointer.
How to understand the pointers in C language