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: <372@vu44.UUCP> Date: Fri, 31-Aug-84 05:16:39 EDT Article-I.D.: vu44.372 Posted: Fri Aug 31 05:16:39 1984 Date-Received: Thu, 30-Aug-84 20:29:20 EDT References: <3461@cbscc.UUCP> <119@scc.UUCP> <284@haring.UUCP> <371@vu44.UUCP> Organization: VU Informatica, Amsterdam Lines: 15 We have been able to squeeze out 4 more bytes from the shortest self reproducing program until now. Here it is: char*p="char*p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34); This one is 76 characters long. Of course it does not end with a newline. If you play dirty, you can substitute 'int' for 'char*' (if sizeof (int) == sizeof (char *)), or better still (but not with the Ritchie C compiler), just delete 'char*'. --- Sjoerd Mullender ...!decvax!mcvax!vu44!sjoerd & Robbert van Renesse ...!decvax!mcvax!vu44!cogito