hello friends!
would you plz explain in details about getc,getchar(),getch(),getche .how these are important in c.
prototype of getc is
int getc ( FILE * stream );
To identify whether end of file encoutered etc by the int value returned.
prototype of getchar is
int getchar ( void );
Returns next character from standard input.
getchar
This is a standard function that gets a character from the stdin.
getch
This is a nonstandard function that gets a character from keyboard, does not echo to screen.
getche
This is a nonstandard function that gets a character from the keyboard, echoes to screen. You need not press Enter key after pressing the character
Use getchar if you want it to work on all compilers. Use getch or getche on a system that supports it when you want keyboard input without pressing [Enter].
And note that the return value of all are int! You need this to properly check for EOF
Regards,
Girish.