+ 8
why does it return an int
in c getchar() and getc() return int but all values that they return can be returned as a char is there any logical reason for that
6 Answers
+ 7
Yes...It actually return the ASCII value of charachar which is integer.
+ 5
Tushar post this question in seperate thread.
+ 5
Because EOF which is one possible return value does not lie within the ASCII range.
+ 4
Maroon (AJ AY) (Traveling)
char also stores the ASCII value which is integer but this integer is between -128 and 127
+ 3
Sonic I accept that but it can stored in char check this
char f(){return EOF;}
this function return a char and can return EOF easily
+ 1
How to be the best coder