putc [ HP C/iX Library Reference Manual ] MPE/iX 5.0 Documentation
HP C/iX Library Reference Manual
putc
Writes a character to an open stream.
Syntax
#include <stdio.h>
int putc (int c, FILE *stream);
Parameters
c A character to be written to an open stream.
stream A pointer to an open stream.
Return Values
x The character written.
EOF An error occurred, and errno is set to indicate the error
condition.
Description
The putc function writes a single character to the specified stream.
This function is equivalent to fputc() except that it is implemented as a
macro. Because putc() can evaluate the stream more than once, the
arguments should never be an expression with side effects.
Example
Refer to the example located in the getc function description.
See Also
fputc(), getc(), putchar(), puts(), fwrite(), ANSI C 4.9.7.8, POSIX.1 8.1
MPE/iX 5.0 Documentation