1) Start from the inside of the expression and work your way out.
2) Understand how pointers to functions are declared.
3) Understand operator precedence.
4) Keep in mind that the parentheses are there to override operator precedence.
5) If all else fails, use cdecl
I'm getting the feeling that you're posting homework questions here, so I don't want to give the answers to the specific questions you listed. Hopefully the steps above will get your started and if you get stuck, post again.
2 char * ( *(*a[N])() )() -> A function which return a char pointer
*(*a[N])() -> A function which return a function pointer
*a[N] -> A function pointer's pointer array
So you can understand it in sequence below:
1. Get the Nth element from a which is a pointer to a pointer of a function <- a[N]
2. Get the function's pointer <- *a[N]
3. Call the function which return a function pointer
<- *(*a[N])()
4. Call the return function which return a char pointer
<- char * (*(*a[N])())()
But i donnot programming in such a way it is difficult to understand ^_^
"Simple is good"
Hope this helps you! I want to migrate to Canada or Australia. Any relative information you supplied will be appreciated!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.