Could anyone give me some hint on how to understand these declarations in C programming. Are they some kind of function pointers?
Asked
Active
Viewed 378 times
0
-
Find the leftmost identifier (in this case, `func`). Then work your want out, remembering that `()` and `[]` bind before `*`; IOW, `*a[]` is an array of pointer, where `(*a)[]` is a pointer to an array, and `*f()` is a function returning pointer, where `(*f)()` is a pointer to a function. `int (*func())[5]` declares `func` as a function returning a pointer to 5-elelment array of `int`. `int (&func())[5]` is not a legal C declaration. – John Bode May 29 '13 at 17:25
-
There's no such thing as `int (&func())[5]` in C. – AnT stands with Russia May 29 '13 at 18:14
1 Answers
0
And read Kernighan and Ritchie; the section on declarators in particular. Keep a copy in your bathroom.

Bathsheba
- 231,907
- 34
- 361
- 483