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
write a program to print data of 5 five students with structures?
What is omp_num_threads?
What is the right type to use for boolean values in c? Is there a standard type? Should I use #defines or enums for the true and false values?
When a c file is executed there are many files that are automatically opened what are they files?
Is python a c language?
I need previous papers of CSC.......plz help out by posting them.......
Tell us bitwise shift operators?
What is the difference between far and near ?
Which node is more powerful and can handle local information processing or graphics processing?
What is file in c language?
How can I insert or delete a line (or record) in the middle of a file?
how to print the character with maximum occurence and print that number of occurence too in a string given ?
How can my program discover the complete pathname to the executable from which it was invoked?
How do we declare variables in c?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above