title: for Repetition Statement in c
body: <p>When for statement is executed the value of counter variable has to be increased by one because I use pre-increment operator.</p>
  
  <pre class="lang-c prettyprint-override"><code>#include &lt;stdio.h&gt;
  int main (void)
  {
      unsigned int counter ;
      for ( counter = 1; counter &lt;= 10; ++counter /*here is problem*/) {
          printf( "%u\n", counter );
      }
  }
  </code></pre>
  
  <p>Problem -</p>
  
  <blockquote>
    <p>When the program is executed, the value of counter variable initially is 1 instead of 2.</p>
  </blockquote>