Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 (MC830713); site vu44.UUCP Path: utzoo!linus!philabs!mcvax!vu44!sjoerd From: sjoerd@vu44.UUCP (Sjoerd Mullender) Newsgroups: net.sources Subject: Re: Thompsons self duplicating program Message-ID: <371@vu44.UUCP> Date: Fri, 31-Aug-84 04:49:30 EDT Article-I.D.: vu44.371 Posted: Fri Aug 31 04:49:30 1984 Date-Received: Thu, 30-Aug-84 20:28:52 EDT References: <3461@cbscc.UUCP> <119@scc.UUCP> <284@haring.UUCP> Organization: VU Informatica, Amsterdam Lines: 17 Jim McKie (mcvax!jim) mentioned a self replicating program he extracted from 'Some Self-Reproducing Programs' by Theo de Ridder. I have been able to squeeze out a few more bytes. Here it is: char p[]="char p[]=%c%s%c;main(){printf(p,34,p,34,10);}%c";main(){printf(p,34,p,34,10);} This program is 89 characters. It can be made shorter if you don't insist on a newline at the end of a program: char p[]="char p[]=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);} This one is only 80 characters long. --- Sjoerd Mullender ...!decvax!mcvax!vu44!sjoerd