self-abusing C programs
jack at rlgvax.UUCP
jack at rlgvax.UUCP
Tue Sep 4 23:30:45 AEST 1984
> Re: main(){system("cat foo.c");}
>
> I beleive there is an implicit assumption that programs that
> simply print out their source files do not qualify as
> "self reproducing" because they are so trivial. If we alow this,
> then cat can produce any arbitrary program whose source is already
> on the system. Not very exciting.
>
> --jcz
> North Carolina State University
To make writing self-replicating C programs fun, I'd say
the reasonable restriction is that they are forbidden to
make any system call except 'write'.
I have one that satisfies the further restriction that
it makes no call on any library routine except 'write'.
More information about the Comp.lang.c
mailing list