Home > Back-end >  Questions about stdout is line buffer
Questions about stdout is line buffer

Time:10-14

, the article says stdout is line buffer, the output will be placed in a buffer, and only by a newline, namely, until meet new line, will only output will be output to the screen together, and for the following program
#include
Int main () {
Fprintf (stdout, "Hello");
Fprintf (stderr, "World!" );
return 0;
}
The output is a result,
World! Hello
But I run this program as a result of the HelloWorld! , can not get the result, why?

CodePudding user response:

Line because of the program exits, so also is over, stderr is no buffer, will be directly output;
Application of the building Lord, in my code running is
World! Hello
  • Related