Function pointer, array, and array pointers types wrap the declaration around the object. So declaring a local looks like this. Declaring a local int *provided for comparison:
Code:
int *intptr;
int(*funcptr)(int,int);
int array[10];
int (*arrayptr)[10];
Typedefs are the same:
Code:
typedef int *intptr_t;
typedef int(*funcptr_t)(int,int);
typedef int array_t[10];
typedef int (*arrayptr_t)[10];
Function arguments are the same, except that the name can be omitted.
Casts are look like omitted names too (except you can't cast to an array). The identifier is not part of the cast, so the cast does not wrap around it:
Code:
(int *)intptr;
(int(*)(int,int) ) funcptr;
(int (*)[10]) arrayptr;
Return types follow the same pattern except that the "name" is the rest of the function declaration. This looks weird, but follows the pattern (again, you can't return arrays):
Code:
int *func1(char param);
int(*func2(char param))(int,int);
int (*func3(char param))[10];