main()
{
int c;
c = getchar();
while(c != EOF){
putchar();
c = getchar();
}
}
Why is the output printed after every hit of return key?
Isn't getchar holding only one value, so how does the program convey the information that enter has been pressed? Who takes care of this?
That optional&partial buffering, on your platform, probably flushes the buffer whenever you do write a newline character. It doesn't have to do so on every platform.