Next: Dereferencing Pointers, Previous: Pointer-Variable Declarations, Up: Pointers [Contents][Index]
Every type in C has a designator; you make it by deleting the variable name and the semicolon from a declaration (see Type Designators). Here are the designators for the pointer types of the example declarations in the previous section:
int * /* Pointer toint. */ double * /* Pointer todouble. */ double (*)[5] /* Pointer todouble[5]. */
Remember, to understand what type a designator stands for, imagine the
corresponding variable declaration with a variable name in it, and
figure out what type that variable would have. Thus, the type
designator double (*)[5] corresponds to the variable declaration
double (*variable)[5]. That deciares a pointer variable
which, when dereferenced, gives an array of 5 doubles.
So the type designator means, “pointer to an array of 5 doubles.”