title: Difference between i++ and ++i
body: <p>So, I understand that i++ increments post the condition is fulfilled, while ++i increments before the condition is fulfilled. That takes me to my question:</p>
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      int i=0;
      while(++i&lt;10)
          printf(&quot;%d\n&quot;,i);
      return 0;
  }
  </code></pre>
  <p>Now here we need the initialization of i from 0 as when it goes in the while loop, it will get incremented first, and thus it will be like while(1&lt;10), and so it will print numbers from one to ten.</p>
  <p>Second code:</p>
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      int i=0;
      while(i++&lt;10)
          printf(&quot;%d\n&quot;,i);
      return 0;
  }
  </code></pre>
  <p>Now since i++ increments after the value has been used, so why do we initialize i from i=0, as if it gets incremented after the comparision of value of i takes place, then why isn't 0 getting printed as well because the first loop should go like while(0&lt;10), and not like while(1&lt;10)? So, why is zero not getting printed?</p>
  <p>Thank you for your time.</p>