This is called a "quine" and it's covered in the book "Gödel, Escher, Bach: An Eternal Golden Braid" (luckily I have one copy of it :)) It is basically derived from the paradox-producing expression which is known as Quine Paradox:
"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
main(a){printf(a,34,a="main(a){printf(a,34,a=%c%s%c,34);}",34);}
回覆刪除:p
This is called a "quine" and it's covered in the book "Gödel, Escher, Bach: An Eternal Golden Braid" (luckily I have one copy of it :)) It is basically derived from the paradox-producing expression which is known as Quine Paradox:
回覆刪除"Yields falsehood when preceded by its quotation" yields falsehood when preceded by its quotation.
http://en.wikipedia.org/wiki/Quine_%28computing%29