Fancy Declarations
C enables you to create elaborate data forms. Although we are sticking to simpler forms, we feel it is our duty to point out the potentialities. When you make a declaration, the name (or identifier) can be modified by tacking on a modifier.
Modifier | Significance |
---|---|
* | Indicates a pointer |
() | Indicates a function |
[] | Indicates an array |
C enables you to use more than one modifier at a time, and that enables you to create a variety of types.
int board[8][8]; // an array of arrays of int int ** ptr; // a pointer to a pointer to int int * risks[10]; // a 10-element array of pointers to int int (* rusks)[10]; // a pointer to an array of 10 ints int * oof[3][4]; // a 3 x 4 array of pointers to int int (* uuf)[3][4]; // a pointer to a ...
Get C Primer Plus, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.