Autoexotic programming

hoey at nrl-aic.ARPA hoey at nrl-aic.ARPA
Sat Sep 1 03:10:00 AEST 1984

From:  Dan Hoey <hoey at nrl-aic.ARPA>

The purpose of a self-reproducing program is to be a backup, in case
the source is lost.  Thus it is unwise to rely on the presence of the
source file, as in some proposed solutions.

The only short examples provided so far assume that the character code
for double-quote is 34.  Here's an 89-character modification that
doesn't depend on the character set (remove the line break).


Of course, we may as well be tasteful and print a trailing newline, but
that takes 131 characters, as below (remove the internal line breaks).


The only palindrome previously seen has an unclosed comment.  This can
be repaired until c cares about nested comments.


You may wish to put a newline on the beginning and end of that program.


More information about the Comp.lang.c mailing list