Small introspective program

Jeff Olsen olsen at casbah.acns.nwu.edu
Mon Mar 11 09:12:30 AEST 1991


In article <AB2MbsdCB6 at s514.ipmce.su> leo at s514.ipmce.su writes:
>	This is an introspective program in C.
>char*a="char*a=%c%s%c;main(){printf(a,34,a,34);}";main(){printf(a,34,a,34);}
>	Do you know a shorter program?

sure...

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

I tried it with MSC 6.0 and whatever the default cc is on a encore
multimax.  GCC doesn't appear to like it, though.

Jeff Olsen
olsen at eecs.nwu.edu



More information about the Comp.lang.c mailing list