title: Unexpected output in C
body: <p>Following is my code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  
  int i =5;
  
  int main(i)
  {
   if(i&lt;10)
    printf(" %d\n",printf("%d",i+main(++i)));
   return 0;
  }
  </code></pre>
  
  <h3>Output</h3>
  
  <p>(in both both Ideone.com and Codeblocks)</p>
  
  <p>10 2 </p>
  
  <p>9 1</p>
  
  <p>8 1</p>
  
  <p>7 1</p>
  
  <p>6 1</p>
  
  <p>5 1</p>
  
  <p>4 1</p>
  
  <p>3 1</p>
  
  <p>2 1</p>
  
  <p>Can someone explain the reason behind this output? I expected 91, 81, ...., 51. Also, is it true that recursive main() results in unexpected outputs?</p>
  
  <p>PS: This is a program that I had found in an online forum. </p>