[net.lang.c] self-reversing programs

eklhad@ihnet.UUCP (K. A. Dahlke) (09/07/84)

<source.c ..... c.ecruos>

The following program prints itself in reverse.
It is only 202 bytes long, and i can't find any way to make it shorter.
There are (of course) no new lines in it,
but i broke it up here for the sake of the net.

char*q=
"char*q=;p(c){putchar(c);}
main(n){char*s=q+100;while(s-->q){
if(s==q+6&n)p(34),main(0),p(34); p(*s);}}";
p(c){putchar(c);}
main(n){char*s=q+100;while(s-->q){
if(s==q+6&n)p(34),main(0),p(34); p(*s);}}

Any shorter??
-- 

Karl Dahlke    ihnp4!ihnet!eklhad