title: printf("Enter 'a' : "); runs 2 times after 1st loop
body: <pre><code>int main (int argc, char *argv [])
  {
       char a = 'v';
  
       for (int i = 0; a != 'x'; ) 
       {        
           printf("Enter 'a' : "); 
           scanf("%c",&amp;a);
       }
  
       return 0;
  }
  </code></pre>
  
  <p>I ran it and gave input <strong>k</strong>. When I hit enter after this , why my <code>printf</code> runs <strong>2 times</strong> when loop runs second times?</p>