putc, putchar, fputc, putw - put character or word on a stream
int putc(c, stream)
int fputc(c, stream)
int putw(w, stream)
Putc appends the character c to the named output stream. It
returns the character written.
Putchar(c) is defined as putc(c, stdout).
Fputc behaves like putc, but is
a genuine function rather than a
Putw appends word (that is, int)
w to the output stream. It
returns the word written. Putw neither assumes nor causes special
alignment in the file.
fopen(3), fclose(3), getc(3), puts(3), printf(3), fread(3)
These functions return the constant EOF upon error. Since this is
a good integer, ferror(3) should be used to detect putw errors.
Because it is implemented as a macro, putc treats a stream argument
with side effects improperly. In particular
doesn’t work sensibly.
Errors can occur long after the call to putc.