-
Most systems do not echo the characters just entered until the user presses the Enter key. This form of input is buffered input.
-
As we can see, follow image describe the difference between 'buffer input' and 'no buffer input'

Buffering Is Divided into Two Categories:
1.完全缓冲I/O:完全缓冲是指当缓冲区被填满时才刷新缓冲区(即内容被发送到目的地)。
2.行缓冲I/O:行缓冲指出现换行符的时候才刷新缓冲区。
- 注:对于键盘输入来说通常为行缓冲输入,所以在按下Enter键后才刷新缓冲区。
- When a program reads a file, it must be able to detect the end of the file to know where it should stop. Therefore, C has a built-in end-of-file detector.