int x; |
A simple integer |
int x[5]; |
An array (with 5 elements) of integers |
int x[5][6]; |
An array (with 5 elements) of arrays (with 6 elements) of integers;
such "array of arrays" may be interpreted as a 5x6 matrix |
int *x; |
A pointer to an integer |
int *x[5]; |
An array of pointers to integers |
int x(); |
A function (more precise, a prototype of a function) which returns an integer |
int x(int a); |
A function which accepts one integer argument, and which returns an integer |
int x(int a,int *b); |
A function which accepts two arguments, the first one is an integer, and second
one is a pointer to an integer, and which returns an integer |
int x(int,int*); |
The same as above, but actual names of arguments may be omitted in function
prototypes (but not in function definitions) |
int *x(); |
A function which returns a pointer to an integer |
int *x(int); |
A function which accepts one integer argument, and which returns a pointer to an integer |
int **x; |
A pointer to a pointer to an integer (this declaration is logically equivalent
with the next one) |
int *x[]; |
An array of unknown size of pointers to integers (this declaration is
logically equivalent with the previous one) |
int (*x)[5]; |
A pointer to an array (with 5 elements) of integers |
int (*x)(); |
A pointer to a function which returns an integer |
int (*x)(int,int); |
A pointer to a function which accepts two integer arguments and which returns an integer |
int (*x[5])(); |
An array of pointers to a function which returns an integer |
int (*x(*x())[5])(); |
A function which returns a pointer to an array of pointers to a function which returns an integer |
int (*x(*x(int))[5])(int*); |
A function which accepts one argument which is a pointer to an integer,
and which returns a pointer to an array of pointers to a function which accepts one integer
argument and which returns an integer |
int (*(*x[5])())[6]; |
An array (with 6 elements) of pointers to a function which returns a pointer to an array
(with 5 elements) of integers |