PUTC(3S) COMMAND REFERENCE PUTC(3S)
NAME
putc, putchar, fputc, putw - put character or word on a
stream
SYNOPSIS
#include <stdio.h>
int putc(c, stream)
char c;
FILE *stream;
putchar(c)
fputc(c, stream)
FILE *stream;
putw(w, stream)
FILE *stream;
DESCRIPTION
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 macro.
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.
DIAGNOSTICS
These functions return the constant EOF upon error. Since
this is a good integer, ferror(3s) should be used to detect
putw errors.
CAVEATS
Because it is implemented as a macro, putc treats a stream
argument with side effects improperly. In particular
putc(c, *f++);
doesn't work sensibly.
Errors can occur long after the call to putc.
SEE ALSO
fopen(3s), fclose(3s), getc(3s), puts(3s), printf(3s),
fread(3s).
Printed 10/17/86 1
%%index%%
na:72,103;
sy:175,930;
de:1105,733;
di:1838,284;
ca:2122,341;
se:2463,213;
%%index%%000000000108