self-abusing C programs

Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Thu Aug 30 01:51:15 AEST 1984

There is a whole family of self-reproducing programs that extends
quite easily to bistable, tristable, etc. groupings as well as to
self-reversing programs and any other specified transformation:

/* this file is source.c */
main(){system("cat source.c");}

This reduces most such questions to triviality.

More information about the Comp.lang.c mailing list