Skip to content

Instantly share code, notes, and snippets.

@tom-lpsd
Created October 6, 2012 13:06
Show Gist options
  • Save tom-lpsd/3844893 to your computer and use it in GitHub Desktop.
Save tom-lpsd/3844893 to your computer and use it in GitHub Desktop.
compicate type decl
#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