is there a c program which outputs itself?

house ron s64421 at zeus.usq.EDU.AU
Mon Mar 25 22:27:46 AEST 1991


rxg3321 at isc.rit.edu (R.X. Getter ) writes:

>hi,
>	I am looking for a c program which outputs itself. Has anyone
>seen one or heard of one? (No, it cannot read its own source code.)

Here you go.  I can't remember where I got it, so I don't know who
to give the credit to.  It wasn't me.

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

--
Regards,

Ron House.   (s64421 at zeus.usq.edu.au)
(By post: Info Tech, U.C.S.Q. Toowoomba. Australia. 4350)



More information about the Comp.lang.c mailing list