Why run this code and print whole string?
#include <stdio.h>
void main()
{
int a;
while(a!='q')
{
scanf("%c",&a);
printf("%c",a);
}
}
Enter string except q, and finally press enter key. Only now your string will print on the screen. Why?