|
|
#include <stdio.h>int putc(int ch, FILE *stream);
The putc( ) function writes the character contained in the least significant byte of ch to the output stream pointed to by stream. Because character arguments are elevated to integer at the time of the call, you can use character values as arguments to putc( ). putc( ) is often implemented as a macro.
The putc( ) function returns the character written if successful, or EOF if
an error occurs. If the output stream has been opened in binary mode, EOF is a valid value for ch. This means that you may need to use ferror( ) to determine whether an error has occurred.
Related functions are fgetc( ), fputc( ), getchar( ), and putchar( ).
|
|