Does anyone know why fputc takes an integer instead of a character?
Here is the prototype:
int fputc(int char, FILE *stream)
Thank you.
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Does anyone know why fputc takes an integer instead of a character?
Here is the prototype:
int fputc(int char, FILE *stream)
Thank you.
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.