c - Is manually requesting buffering necessary? -


is necessary call functions setbuf() , setvbuf() when open file streams adjust buffering?
isn't i/o buffering handled automatically?

no, buffering handled automatically, maybe not in fashion want or need.

you might want flushing on each write, on newline, on full buffer, , default wrong case.

or might want bigger buffer efficiency.

in cases, adjust default.
though, in general default sensible, , can left alone.

here case automatic sniffer failed badly:
printf statement not executing before scanf statement in netbean


Comments

Popular posts from this blog

ruby - How do I merge two hashes into a hash of arrays? -

java - the value of local variable is not used -