int kr=0;
int ss =0;
while ((kr=getchar()) != EOF){
if(kr != '\n')
{
ss++;
}
printf("%d\n",ss);
}
With this code , printf is waiting until i press enter then printing all the sequential ss values at the same time like in this
. Can somebody explain this behavior ?