C++ buffered stream IO
问题 I understand that by default all stream IO supported by C++ is buffered. This means that data to be output is put into a buffer till it is full and then sent to the output device, similarly for input, the data is read once the buffer is empty...all this is done so that number of expensive system calls could be minimized. But how to verify this behavior in action. I mean consider the following code int main() { cout << "Hello world\n"; return 0 } Where does buffering come into picture here ? I