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