Created
October 6, 2012 13:06
-
-
Save tom-lpsd/3844893 to your computer and use it in GitHub Desktop.
compicate type decl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
char foo() | |
{ | |
return 'x'; | |
} | |
char bar() | |
{ | |
return 'y'; | |
} | |
char (*y[])() = { foo, bar }; | |
char (*(*z())[])() | |
{ | |
return &y; | |
} | |
int main(int argc, char *argv[]) | |
{ | |
char (*(*(*x)())[])(); | |
x = z; | |
printf("%c\n", (*x())[1]()); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment