fputc
Writes a character to the output stream
#include <stdio.h>
int fputc (
int c,
FILE *fp);
The fputc function returns the character written. If a write error occurs, the error indicator is set and fputc returns EOF. If an error occurs, errno is set.
The fputc function 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)
fputc (c, stdout);
fclose (fp);
}