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

Answer Posted / arjun tiwari

What is difference between getchar and getch?
Computer Programming Questions
Answers.com > Wiki Answers > Categories > Technology > Computers > Computer Programming > C Programming
View Slide Show
Best Answer
Getchar() will accept a character from keyboard displays immediately while typing and need Enter key to pressed for proceeding.

Getch() Normally we will use it at the end of the main(). It just accepts a key stroke and never displays it and proceeds further.
Getche() will accept a character from keyboard display it immediately does not wait for Enter key to pressed for proceeding.
__________________________________________________________________
getch() - get character from screen without echo and compiler didn't wait for another key.
getche() - get character from screen and compiler didn't wait for another key
getchar() - get character from screen and compiler wait for another key.
_____________________________

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different file extensions involved when programming in C?

758


What are the disadvantages of external storage class?

592


What are the different types of constants?

640


ATM machine and railway reservation class/object diagram

4805


Are pointers really faster than arrays?

563






I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

1907


Why string is used in c?

581


Explain how do you view the path?

657


List the difference between a "copy constructor" and a "assignment operator"?

584


What is the use of sizeof () in c?

558


What is selection sort in c?

611


Is c programming hard?

576


What would be an example of a structure analogous to structure c?

576


What are the different types of C instructions?

678


What is a keyword?

747