I enjoy programming puzzles, and as such I really like MaryMary's weekly Java puzzler. This weekend, while sorting out an attic bookcase I came across my old copy of the The C Puzzle Book by Alan Feuer. I got this book way back in the early eighties when I was first learning C. This book contains the memorable puzzle called Pointer Stew. If you could work out what Pointer Stew output, you really knew your pointers, arrays and operator precedence.

char *c[]={
char **cp[]={c+3,c+2,c+1,c};
char ***cpp=cp;
	printf("%s ",*--*++cpp+3);
You just couldn't come up with such a complicated puzzle in Java (and that's a good thing).


Post a Comment:
Comments are closed for this entry.

This blog copyright 2010 by plamere