C language int * p [4] and int (* p) [4] distinction

* P int [. 4] : // define a pointer array, each element of the array is a pointer, each pointer points to where the program requires subsequent re-defined.
int (* P) [. 4] : // define an array pointer that points to a one-dimensional array having four elements (each element in the array of type int).
Right Left principle: the right of a variable combination of talk, talk to the left combination.
int * p [4]: p talk right combination of variables, so that he is an array, talk left binding, it is a pointer to the array .
int (* p) [4] : p talk dereference binding variable, a pointer, talk right binding, it is an array of pointers .

Published 77 original articles · won praise 23 · views 7533

Guess you like

Origin blog.csdn.net/Hots3y/article/details/102980470