Question on printf()
Doug Gwyn
gwyn at smoke.BRL.MIL
Fri Jun 8 05:56:41 AEST 1990
In article <24674.266e3b81 at kuhub.cc.ukans.edu> jian at kuhub.cc.ukans.edu writes:
>that if I don't do any I/O and linefeed after printf(), the printf() does
>not print the string argument on the standard output. Why? How can I avoid
>this problem?
Just insert the following immediately after you call printf():
fflush(stdout);
This will force the data buffered by stdio for the stdout stream
to be sent to the output device; normally that occurs only at
each new-line.
More information about the Comp.unix.questions
mailing list