title: how does if (i++) condition work?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4445706/post-increment-and-pre-increment-concept">Post Increment and Pre Increment concept?</a>  </p>
  </blockquote>
  
  
  
  <p>I cant understand how the "if condition" works with the increment/decrement operator in this scenario:</p>
  
  <pre><code>#include&lt;stdio.h&gt; 
  void main() 
  { 
    int n=0; 
    if(n++) 
    { 
      printf("C-DAC"); 
    } 
    else if(n--) 
    { 
      printf("ACTS"); 
    } 
  }
  </code></pre>
  
  <p>Its output is ACTS.</p>
  
  <p>what is happening in the IF condition?</p>