# fputc function

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);

Example program. Copy a file.

## Man pages

fputc Write a character.

## See Also:

- fgetc Get a character from a file.
- fprintf Put a formatted line into a file.
- fopen Open a file.
- popen Open a pipe.
- pclose Close a pipe.

Top | Master Index | Keywords | Functions