write a character to stdout
#include <stdio.h> int putchar( int c );
The putchar() function writes the character specified by the argument c to the output stream stdout.
The function is equivalent to
fputc( c, stdout );
The putchar() function returns the character written. If a write error occurs, the error indicator is set, and putchar() returns EOF. When an error has occurred, errno contains a value that indicates the type of error that has been detected.
errno, fputc(), fputchar(), fputs(), putc()
#include <stdio.h> void main() { FILE *fp; int c; fp = fopen( "file", "r" ); c = fgetc( fp ); while( c != EOF ) { putchar( c ); c = fgetc( fp ); } fclose( fp ); }
ANSI
All (except DOS/PM)