Quine Programs
Quine programs are so named after the American mathematician and logician
Willard van Orman Quine (1908/06/25 - 2000/12/25) who introduced the concept.
Note: there is a short biography of Quine in the text
(on page 729 of the 5th edition, and page 776 of the 6th edition).
Here are a couple of links:
Quine C programs
-
quine1.c
A pretty standard C program.
Note that if you download it, there are tab characters in front of
the deeply indented code of the for-loop of print_string and the
one line bodies of the two for-loops of main(); these may be
expanded to spaces in the download process. Also, so that you
can see the code, I have appended the suffix ".txt"
-
quine2.c
A much shorter C program that cheats by being on one line and not
printing a newline at the end.
Page URL: http://www.d.umn.edu
/~ddunham/cs3511f06/quine/index.html
Page Author: Doug Dunham
Last Modified: Tuesday, 07-Nov-2006 09:20:03 CST
Comments to: ddunham@d.umn.edu