title: What's the output of following program which shows the unusual output and why?
body: <p><a href="https://i.stack.imgur.com/oX1w8.png" rel="nofollow noreferrer">see the ouput image</a></p>
  
  <p>What's the output of following code and why?</p>
  
  <p>I am curious to know why c compiler shows the unusual output.</p>
  
  <p>What happens behind the scene?</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int main()
  {
      char a,b,c;
  
      printf("Enter First char:");
      scanf("%c",&amp;a);
  
      printf("Enter Second char:");
      scanf("%c",&amp;b);
  
      printf("Enter Third char:");
      scanf("%c",&amp;c);
  
      return 1;
  }
  
  
  Enter First char:a
  Enter Second char:Enter Third char:c
  </code></pre>
  
  <p>see above output, its not taking 2nd input and directly asking third one!</p>