fputc writes one character to a file.
Library: stdio.h Prototype: int fputc(int c, FILE *stream); Syntax: FILE *fp; int ch = 'a'; fp = fopen("/tmp/file", "w"); fputc(ch, fp); fclose(fp);