How do I interpret complex declarations like:
int * (* (*fp1) (int) ) [10]; ---> declaration 1
int *( *( *[5])())(); --------> declaration 2
No, you don't need to read it loud with complex steps like "clockwise/spiral rule" and "the right rule". Why should you? You only need to know how to use it! Don't make the simple one complex.
C declarations in fact work in a simple rule: declare as how would be used.
Consider the code you gives out:
int * (* (*fp1) (int) ) [10]; ---> declaration 1
int *( *( *[5])())(); --------> declaration 2
For the first declaration, this means that *(*(*fp1)(int))[int] is an int. And that's it.
For example, you know that *(*(*fp1)(5))[0] is an int, and *(*(*fp1)(2))[9] is an int too.
And The second declaration is incomplete. Even gcc won't know what you want to convey.