fputc, putc
From cppreference.com
| Defined in header <stdio.h>
|
||
| int fputc( int ch, FILE *stream ); |
||
| int putc( int ch, FILE *stream ); |
||
Writes a character ch to the given output stream stream. putc() may be implemented as a macro and evaluate stream more than once, so the corresponding argument should never be an expression with side effects.
Internally, the character is converted to unsigned char just before being written.
Parameters
| ch | - | character to be written |
| stream | - | output stream |
Return value
On success, returns the written character.
On failure, returns EOF and sets the error indicator (see ferror()) on stream.