Quine

HomePage | Recent changes | View source | Discuss this page | Page history | Log in |

Printable version | Disclaimers | Privacy policy

A quine is a computer program that produces its complete source code as its only output. It is often used for hackish amusement to try and develop the shortest possible quine in any given programming language.

Quines are named after W. V. Quine, who made extensive study of indirect self-reference.

Sample quine in C

char x[]="char x[]=%c%s%c;%cint main() {printf(x,34,x,34,10,10);return 0;}%c";
int main() {printf(x,34,x,34,10,10);return 0;}

perhaps add some more Quines here