Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!olivea!samsung!sdd.hp.com!spool.mu.edu!munnari.oz.au!brolga!bunyip.cc.uq.oz.au!zeus!s64421 From: s64421@zeus.usq.EDU.AU (house ron) Newsgroups: comp.lang.c Subject: Re: is there a c program which outputs itself? Message-ID: Date: 25 Mar 91 12:27:46 GMT Lines: 17 rxg3321@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@zeus.usq.edu.au) (By post: Info Tech, U.C.S.Q. Toowoomba. Australia. 4350)