write a character to stdout
#include <stdio.h> int fputchar( int c );
The fputchar() function writes the character specified by the argument c to the output stream stdout. This function is identical to the putchar() function. It's equivalent to:
fputc( c, stdout );
The character written, or EOF if a write error occurs. If an error occurs, errno indicates the type of error detected.
#include <stdio.h> void main() { FILE *fp; int c; fp = fopen( "file", "r" ); if( fp != NULL ) { c = fgetc( fp ); while( c != EOF ) { fputchar( c ); c = fgetc( fp ); } fclose( fp ); } }
WATCOM
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
errno, ferror(), fopen(), fputc(), fputs(), putc(), putchar(), puts()