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
Explain that why C is procedural?
What are the two forms of #include directive?
Explain the concept and use of type void.
What are the different types of linkage exist in c?
Why is #define used?
What is self-referential structure in c programming?
Subtract Two Number Without Using Subtraction Operator
How can I do graphics in c?
What is the scope of global variable in c?
How macro execution is faster than function ?
What is use of bit field?
What does the c preprocessor do?
Which header file is essential for using strcmp function?
What is storage class?
How to implement a packet in C