C – Putc

C – Putc 2017-08-07T14:39:38+00:00

putc() :

This function writes the character ch to the specified stream at the current file position and then advance the file position indicator. Even though the ch is declared to be an int, it is converted by putc() into an unsigned char.

The value returned by the function is the value of the character written . if an error occurs, EOF is returned.

Declaration:

int putc(int ch, FILE *stream);

For example, the following program writes a string to the specified stream.

C – EXAMPLE PROGRAM :

Prev Next