#include <stdio.h> i = fputc( c, f );
"fputc" outputs a character to a file. It returns the character that was output.
The standard file "stdout" is normally buffered if and only if the output unit is not the terminal. The standard file "stderr" is usually unbuffered at all times, but this can be changed with the use of "freopen". These can both be changed using "setbuf".
When an output stream is unbuffered, information appears on the destination device as soon as it is written. When it is buffered, a number of characters are saved internally and then written out as a group. "fflush" may be used to force buffered characters to be output before the buffer is full.
"fputc" will return EOF if an output error occurs.
expl c lib setbuf
Copyright © 1996, Thinkage Ltd.