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), and fread(3s). Printed 5/12/88 1
%%index%% na:264,119; sy:383,1422; de:1805,917; di:2722,356; ca:3078,401; se:3479,245; %%index%%000000000110