Next: , Previous: , Up: Pointers   [Contents][Index]


14.4 Pointer-Type Designators

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 to int. */
double *        /* Pointer to double. */
double (*)[5]   /* Pointer to double[5]. */

Remember, to understand what type a designator stands for, imagine the variable name that would be in the declaration, and figure out what type it would declare that variable with. double (*)[5] can only come from double (*variable)[5], so it’s a pointer which, when dereferenced, gives an array of 5 doubles.