fputc

Started by
1 comment, last by frob 4 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/
Advertisement

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