Pointer Stew

A friend of a friend ran across this little gem the other day. See what you can make of it:

char *c[]={
        "ENTER",
        "NEW",
        "POINT",
        "FIRST"
};
char **cp[]={c+3,c+2,c+1,c};
char ***cpp=cp;
main()
{
        printf("%s",**++cpp);
        printf("%s ",*--*++cpp+3);
        printf("%s",*cpp[-2]+3);
        printf("%s\n",cpp[-1][-1]+1);
}

One Reply to “Pointer Stew”

Leave a Reply

Your email address will not be published. Required fields are marked *