I've learned that std::cout is buffered, but I'm not quite sure what that precisely means.
According to what I understand, before the outputs provided into std::cout are displayed on the standard output device—in this case, the console—they are first stored in a buffer, which functions as a sort of intermediary storage between the data being generated and its processing.
This guarantees a degree of optimization (which might not be noticeable on small applications) because storing data into buffers is fast while displaying it is relatively sluggish.
1- Is this introductory explanation correct?
I also have some questions related to the functionality of this process. I did research but so far I haven't found layman explanations for them (and I'm not sure if they can be given):
2- Where is this buffer located, exactly?
3- How does std::cout interact with it?
4- The buffer used for std::cout is the same for std::cin?
I think my question is a bit too broad, but I would still appreciate any explanation you can give me! And if that works best, I may ask for each explanation (or a combination of them) in separate posts or in the text help channel. Also, If I'm getting way too ahead of myself, please say so.
/It's my first post and I will correct it if there's something wrong (like the tags). Sorry for any inconvenience.