June 20, 2006

A C program which prints itself

main(){char *s="main(){char *s=%c%s%c;printf(s,34,s,34,10);}";printf(s,34,s,34,10);}

cool declaration of 's'.
see here 34 is for ' " ' and 10 for newline.

No comments: