About Lesson
Let’s look at the following declarations:
/* function returning a pointer to an int */ int *f();
and
/* pointer to a function returning int */ int (*fp)()
* is a prefix operator and it has lower precedence than (), so parentheses are necessary to force the proper association.
Let’s look at some complicated declarations:
| char **argv | pointer to pointer to char |
| int (*ptra)[10] | pointer to array of int |
| int *ptr[10] | array of pointer to int |
| void *func() | function returning pointer to void |
| void (*func()) | pointer to function returning void |
| int (*(*x())[])() | function returning pointer to array of pointer to function returning int |
| int (*(*x[5])())[10] | array of pointer to function returning pointer to array of int |