What's the output of following code and why?
I am curious to know why c compiler shows the unusual output.
What happens behind the scene?
#include<stdio.h>
int main()
{
    char a,b,c;
    printf("Enter First char:");
    scanf("%c",&a);
    printf("Enter Second char:");
    scanf("%c",&b);
    printf("Enter Third char:");
    scanf("%c",&c);
    return 1;
}
Enter First char:a
Enter Second char:Enter Third char:c
see above output, its not taking 2nd input and directly asking third one!
 
     
    