what is the use of getch() function in C program..
difference b/w getch() and getche()??
Answer Posted / lekha
Both getch() and getche() are used to read single character
there is very little difference
-getch() doesn't display output to screen if used without lvalue
-getche() display output to screen even if used without lvalue
following example will clear this.....
1.
main()
{
getch();
}
2.
main()
{
getche();
}
after running above programs...............
when you press any key, you'll exit from output screen
verify the output by pressing alt+F5
1. will not show anything
2.will show the key you were pressed......
hope you get it.............
| Is This Answer Correct ? | 9 Yes | 3 No |
Post New Answer View All Answers
What does *p++ do? What does it point to?
What is the difference between abs() and fabs() functions?
Do pointers take up memory?
What is array in C
Write a program to identify if a given binary tree is balanced or not.
How can I avoid the abort, retry, fail messages?
What does printf does?
What are the advantage of c language?
What is scope and lifetime of a variable in c?
I need testPalindrome and removeSpace
#include
What is a program flowchart and explain how does it help in writing a program?
Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.
What are the similarities between c and c++?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
Where in memory are my variables stored?