A C program that prints out an exact copy of itself
main(){char q=34, n=10,*a="main() {char q=34,n=10,*a=%c%s%c; printf(a,q,a,q,n);}%c";printf(a,q,a,q,n);}
For more information, see the Recursion Theorem:
http://nano.xerox.com/nanotech/selfRep.html
Previous slide
Next slide
Back to first slide
View graphic version