the program is given no arguments or input files and is just a source code that when executed just prints itself to the console.
In C programming language: Is there a program that prints itself's whole source code?
Such programs exist for many different programming languages. There are web sites that collect them, too, for example:
The classic of course is:
Ken Thompson's Turing Award speech
Reflections on Trusting Trust
http://www.acm.org/classics/sep95/
There are also:
The Quine Page (self-reproducing code)
http://www.nyx.net/~gthompso/quine.htm
The Quine entry at Wikipedia
http://en.wikipedia.org/wiki/Quine
Quines (self-replicating programs)
http://www.madore.org/~david/computers/q...
Reply:Hmmm, hardly seems useful.
Reply:No, but there is one in c++, which may be very easy to convert to c. I don't remember where but it was at cprogramming.com
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment