what is the use of getch() function in C program..
difference b/w getch() and getche()??
Answer Posted / yashwant/9015785079
When you will run program, the program will exit only when you press a character, note that we are talking about a character.
so try pressing numlock, shift key etc (program will not exit if you press these keys) as these are not characters. Also try the program by removing getch(),in this case program will exit without waiting for a character being pressed from keyboard.
Common use of getch is that you can view the output (if any) of your program without having to open the output window if you are using turbo c compiler or if you are not running your program from command prompt.
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
Explain high-order and low-order bytes.
Why does not c have an exponentiation operator?
What is advantage of pointer in c?
What is the use of ?: Operator?
What is c variable?
How many levels of pointers have?
Explain what is operator promotion?
Explain how do you list files in a directory?
What is difference between constant pointer and constant variable?
What is variable and explain rules to declare variable in c?
What’s a signal? Explain what do I use signals for?
How to compare array with pointer in c?
Why pointers are used?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
How can I generate floating-point random numbers?