How to turn off buffering of stdout in C

You can use the setvbuf function:

setvbuf(stdout, NULL, _IONBF, 0);

Here’re some other links to the function.

Leave a Comment