I am lost in this declaration - int (*(*foo)(double))[3];
My understanding is that this is an array with size 3 which element is a function pointer taking double and returning pointer to int. However, the correct explanation seems to be "pointer to function taking double and returning pointer to array of 3 int". The returning pointer to array of 3 int confuses me a lot as int
and [3]
far apart.
Why is that? What is the syntax or rule to declare variables like this complex?