- output a character or word to a stream
#include <stdio.h> int
fputc (int c FILE *stream); int
putc (int c FILE *stream); int
putc_unlocked (int c FILE *stream); int
putchar (int c); int
putchar_unlocked (int c); int
putw (int w FILE *stream);
writes the character
(converted to an ``unsigned char'')
to the output stream pointed to by
Fa stream .
macro acts essentially identically to
but is a macro that expands in-line.
It may evaluate
more than once, so arguments given to
should not be expressions with potential side effects.
is identical to
with an output stream of
writes the specified
to the named output
Fa stream .
functions are equivalent to
except that the caller is responsible for locking the stream
before calling them.
These functions may be used to avoid the overhead of locking the stream
for each character, and to avoid output being interspersed from multiple
threads writing to the same stream.
return the character written.
If an error occurs, the value
returns 0 on success;
is returned if
a write error occurs,
or if an attempt is made to write a read-only stream.
St -isoC .
functions conform to
St -p1003.1-2001 .
function appeared in
The size and byte order of an
varies from one machine to another, and
is not recommended for portable applications.