Advertisement

fputc

Started by December 03, 2023 01:38 PM
1 comment, last by frob 11 months, 3 weeks ago

Does anyone know why fputc takes an integer instead of a character?

Here is the prototype:

int fputc(int char, FILE *stream)

Thank you.

Mike C.http://www.coolgroups.com/zoomer/http://www.coolgroups.com/ez/

So it can take the output of fgetc(). Also probably a carry-over from the 1970s and the default int parameters from the earliest days of C.

This topic is closed to new replies.

Advertisement