putc, putchar, fputc, - put character on a stream
#include <stdio.h>
putc() writes c (converted to an unsigned char) onto the output stream at the position where the file pointer (if defined) is pointing, and advances the file pointer appropriately. If the file cannot support positioning requests, or stream was opened with append mode, the character is appended to the output stream. putchar(c) is defined as putc(c, stdout). putchar() is a macro.
fputc() behaves like putc(). .
On success, putc(), fputc(), and putchar() return the value that was written. On error, these functions return the constant EOF and set errno to indicate the error.
Failure will occur, for example, if the file stream is not open for writing or if the output file cannot grow.
These functions are members of Unison's STDIO implementation. The STDIO implementation rests on top of IOLIB and inherits IOLIB's dependency on each specific server to report an appropriate error code for its usage.
For an exact list of error codes returned by a particular server, refer to that server's documentation in the Unison Programmer's Guide for each specific platform.
Servers may implement these errors codes in response to these functions.
write(), fclose(), ferror(), fopen(), printf(), puts(), setbuf()