title: C/C++ program that prints its own source code as its output
body: <p><a href="http://en.wikipedia.org/wiki/Quine_%28computing%29" rel="noreferrer">Wikipedia</a> says it's called a quine and someone gave the code below:</p>
  
  <pre><code>char*s="char*s=%c%s%c;main(){printf(s,34,s,34);}";main(){printf(s,34,s,34);}
  </code></pre>
  
  <p>But, obviously you have to add</p>
  
  <pre><code>#include &lt;stdio.h&gt; //corrected from #include &lt;stdlib.h&gt;
  </code></pre>
  
  <p>so that the <code>printf()</code> could work.</p>
  
  <p>Literally, since the above program did not print <code>#include &lt;stdio.h&gt;</code>, it is not a solution (?)</p>
  
  <p>I am confused about the literal requirement of "print its own source code", and any purpose of this kind of problems, especially at interviews.</p>