putc
Writes a character to the output stream (function or macro)
#include <stdio.h>
int putc (
int c,
FILE *fp);
The putc function or macro returns the character written. If a write error occurs, the error indicator is set and putc returns EOF.
The putc function is equivalent to fputc, except that it can be implemented as a macro. The putc function or macro writes the character specified by the argument c to the output stream designated by fp.
#include <stdio.h>
main ()
{
FILE *fp;
int c;
fp = fopen ("data.fil", "r");
while ( (c = fgetc( fp )) != EOF)
putc (c, stdout);
fclose (fp);
}