جستجو معمولا جواب میده :
http://stackoverflow.com/questions/105725/how-to-write-a-self-reproducing-code-prints-the-source-on-exec
http://igoro.com/archive/how-to-write-a-self-printing-program/
http://www.madore.org/~david/computers/quine.html