int fputc ( int character, FILE * stream );
Return Value :
On success, the character written is returned.
If a writing error occurs, EOF is returned and the error indicator (ferror) is set.
Example
/* fputc example: alphabet writer */
#include <stdio.h>
int main ()
{
FILE * pFile;
char c;
pFile = fopen ("alphabet.txt","w");
if (pFile!=NULL) {
for (c = 'A' ; c <= 'Z' ; c++)
fputc ( c , pFile );
fclose (pFile);
}
return 0;
}