7.19.7.8 The putc function

Synopsis

1

#include <stdio.h>
int putc(int c, FILE *stream);

Description

2

The putc function is equivalent to fputc, except that if it is implemented as a macro, it may evaluate stream more than once, so that argument should never be an expression with side effects.

Returns

3

The putc function returns the character written. If a write error occurs, the error indicator for the stream is set and putc returns EOF.