PUTC - output a character.

(ANSI Standard)

Usage:

#include <stdio.h>
i = putc( c, f );

Where:

int c;
is the character to be printed out.
FILE *f;
points to the output file.
int i;
is the character that was printed out. "putc" returns EOF if an output error occurs.

Description:

"putc" outputs a character to the given file and returns the character that was written.

By default, all output streams (including "stdout" and "stderr") are normally buffered. This means that a number of characters are saved internally in a memory area called a buffer. When the buffer is full, the characters are then written out as a group. If a program requests input from terminal for which there is buffered output, the output is automatically "flushed" to the terminal, after which the input function begins reading input.

You can use "fflush" to force buffered characters to be output before the buffer is full. However, this is only necessary in special situations. For further details, see "expl c lib fflush".

See Also:

expl c lib sleep

Copyright © 1996, Thinkage Ltd.