Skip to content

Instantly share code, notes, and snippets.

@peko
Created October 19, 2015 15:45
Show Gist options
  • Save peko/98e3729b2b97dd048890 to your computer and use it in GitHub Desktop.
Save peko/98e3729b2b97dd048890 to your computer and use it in GitHub Desktop.
#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