Created
October 19, 2015 15:45
-
-
Save peko/98e3729b2b97dd048890 to your computer and use it in GitHub Desktop.
This file contains 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> | |
int a(int v) { | |
return v*v*v; | |
} | |
int (*b())(int) { | |
return a; | |
} | |
int (*(*c())())(int) { | |
return b; | |
} | |
int (*(*(*d())())())(int) { | |
return c; | |
} | |
int main(int argc, char** argv){ | |
int v = c()()(3); | |
printf("%d\n",d()()()(5)); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment