The analysis principle of pointer variables: from the variable name, according to the operator priority combination, step-by-step analysis. ( the parentheses should be removed from the beginning of p )
Pointer, point to what (x), X is what type of
Int *p; First, starting from P, first with *, that P is a pointer, and then combined with an int, indicating that the pointer points to the type int, so p is a pointer back to the shaping data
Int *p[3]; First starting from P, first with [] so that P is an array, and then combined with the *, that the elements in the array is a pointer type, and then combined with int, indicating that the pointer to the content type is shaped, so, p is a pointer to return the shape of the array of data;
Int (*P) [3]; First, starting from P, first with the *, that P is a pointer, and then combined with [], that the pointer to the content is an array, and then combined with int, that the elements in the array is shaped, so p is a pointer to an array of shaping data;
int p (int); First, starting from P, first with (), that p is a function , and then enter () in the analysis, the function has a shape variable parameters, and then with the outer int, indicating that the function return value is a shaping data;
Int (*p) (int); First, starting from P, first with the pointer, that P is a pointer, and then combined with (), indicating that the pointer points to a function, and then in () with the int, that the function has an int parameter, and then the outermost int, the function return value type int, so p is a A pointer to a function that has an shaping parameter and returns a type that is shaped.
A pointer is a special variable, and the number stored in it is interpreted as an address in memory. To figure out a pointer requires four aspects of the pointer: the memory area of the pointer itself, the value of the pointer, the memory area that the pointer is pointing to, the type of the pointer, and the type that the pointer points to.
Pointer pointer function pointer array