tags:

views:

76

answers:

3

Hello,

I hear 3 years ago problem and apparently have infinity solutions. I want to find one of this infinity set.

Problem: Write program (have only one file example "selfsource.c") who printing on stdout self source code and exits.

All techniques all alowed. Anyone can help me?

+3  A: 

This is called a Quine.

Wikipedia has an example in C.

SLaks
+2  A: 

More examples than you could possibly need can be found at http://www.nyx.net/~gthompso/self_c.txt.

torak
A: 

Google for quine programs.

wilhelmtell