COT 6315 Section 7867X /NUT CS 710-R Spring 1998

Miscellaneous Information


Self Reproducing Program

To make a self-reproducing program in C, we start with a first incorrect but enlightening attempt. This shows the general plan of trying to print a string with an embedded quoted version of itself.

The result of running this first program exhibits a problem, however. It does not properly quote the quoted symbols within the string.

As second more complicated and correct attempt introduces a quoting function that properly quotes symbols within the string when it is printed as a string.

In a programming language without some nesting print function like printf of C one can implement a printf-like function to use this same scheme.

Dilbert and Misunderstanding Computation Theory

The comic strip referenced (Dilbert of 24 December 1997) involves Dan (the illogical scientist) speaking to Asok (the intern). Dan points out that it is provably impossible for Asok to write the software he's working on. Asok says, ``I don't mean to be rude, but it's not logically possible to prove something can't be done.''

Dan points out he's a trained scientist. Asok asks Dan about the training. That's the kind of training you'll get here.


This document is copyright 1997 by Joseph N. Wilson.