Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site whuxl.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!whuxl!mike
From: mike@whuxl.UUCP (BALDWIN)
Newsgroups: net.sources,net.lang.c
Subject: Re: Thompson's self-duplicating program
Message-ID: <182@whuxl.UUCP>
Date: Tue, 21-Aug-84 12:24:57 EDT
Article-I.D.: whuxl.182
Posted: Tue Aug 21 12:24:57 1984
Date-Received: Wed, 22-Aug-84 01:41:06 EDT
Organization: Bell Labs, Whippany, N.J.
Lines: 10

[In reference to Thompson's paper in the last ACM Computer Magazine]
The shortest self-duplicating C program I've seen is:

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

It doesn't have a newline at the end.  It's a slight
variation of something I saw a while ago somewhere...

							Michael Baldwin
							harpo!whuxl!mike