what is the difference between getch() and getchar()?

Answer Posted / m@ht@b ahm@d

getchar():- this function returns a character that has been recently typed. the typed character is echoed to the computer screen. after typing the appropriate character the user is required to press enter.

getch():- This function also returns a character that has been recently typed, bet neither the user is required to press enter key after entering the character nor the typed character echoed to the computer screen.

getche():- the advantage of this function over getchar() is that as soon as the user types a character, the character is immediately accepted, i.e. the user is not required to press enter key after typing a character.

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Are there constructors in c?

598


How macro execution is faster than function ?

668


What is array of structure in c programming?

755


What does typeof return in c?

640


What is ctrl c called?

598






Why is c called a mid-level programming language?

729


Process by which one bit pattern in to another by bit wise operation is?

615


What is volatile c?

525


What is memcpy() function?

622


Do you know the use of 'auto' keyword?

662


Write a program to print factorial of given number using recursion?

605


How can I discover how many arguments a function was actually called with?

635


What does struct node * mean?

603


Write program to remove duplicate in an array?

602


What is structure in c definition?

576