I'd like to ask what's the difference between library functions
putc() and fputc(). Their functional explanation in my C
reference is EXACTLY the same. The only difference is this
sentence in fputc(), "Even though ch is declared to be an int
for historical reasons, it is converted by fputc() to an
unsigned char."
So,
1) Aren't the two functions supposed to be exactly the
same and perform exactly the same operations ?
2) When fputc()'s ch argument
is converted to an unsigned
char since it is declared as an int in its prototype because
character arguments are elevated to ints at the time of the call ?
int fputc( int ch, FILE *stream );
3) The same facts apply in another the case of lib functions
fgetc() and getc(). Any comments on this, too ?
thanks,
trekker