void setbuf(FILE *stream, char *buffer);

Defines how a stream should be buffered. This should be called after the stream has been opened but before any operation has been done on the stream. Input and output is fully buffered. The default BUFSIZ is the size of the buffer. The argument buffer points to an array to be used as the buffer. If buffer is a null pointer, then the stream is unbuffered.