LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   turn off buffering (https://www.linuxquestions.org/questions/programming-9/turn-off-buffering-249051/)

suchi_s 10-30-2004 06:34 AM

turn off buffering
 
Which one of the following turns off buffering for stdout?
Choice 1
setbuf( stdout, FALSE );
Choice 2
setvbuf( stdout, _IONBF );
Choice 3
setvbuf( stdout, NULL );
Choice 4
setbuf( stdout, _IONBF );
Choice 5
setbuf( stdout, NULL );

Mara 10-30-2004 07:08 AM

No, no, no... Definitelly homework. It's an easy question. You have it in 'man setbuf'.

ToniT 10-30-2004 07:14 AM

Are you filling some sort of query there? ;)

Choice 5 does it, because it is an alias for
Code:

setvbuf(stdout,NULL, _IONBF, 8192)
, but for explicitly set buffering off
I would use command
Code:

setvbuf(stdout,NULL,_IONBF,0)
.


All times are GMT -5. The time now is 04:01 AM.