There are, of course, several examples of self-printing C code.
The following is a very short self-printing (nonstandard) C program
- The program is run on an ASCII machine.
- No newline is needed at the end of the source.
- char * does not lose any information when converted to int.
- int has the same bit representation, size, and
argument passing convention as char *.
- A random return value from main does not cause problems.
- printf works without prototype.
Last update: 2000 December 10