I am beginner in C programming language, recently I have studied about getchar function, which will accept a character from the console or from a file, display it immediately while typing and we need to press Enter key for proceeding.
It returns the unsigned char that they read. If end-of-file or an error is encountered getchar() functions return EOF.
My question is that, When it returns unsigned char, then why its returned value is stored in int variable?
Please help me.