According to Precedence and associativity of Operators in the C Programming language.
You can understand it in the following steps:
int (*(*q)(int (*)()))();
q->*->(int (*)())->*->()->int
1 2 3 4 5
1:q is a pointer
2:q is a function pointer, the function it points to has a parameter int (*)(), which is also a function pointer, points to a function has no parameters and return type is int.
3:q is a function pointer, the function it pointers to has parameter int (*)(), which is also a function pointer, points to a function has no parameters and return type is int. And
the function which q points to has a return type : pointer.
4:q is a function pointer, the function it pointers to has parameter int (*)(), which is also a function pointer, points to a function has no parameters and return type is int. And
the function which q points to has a return type : pointer(this pointer also points to a function which has no parameter).
5:q is a function pointer, the function it pointers to has parameter int (*)(), which is also a function pointer, points to a function has no parameters and return type is int. And
the function which q points to has a return type : pointer(this pointer also points to a function which has no parameter and the function's return type is int).