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
Is array name a pointer?
Explain how do you print only part of a string?
How do I swap bytes?
What does s c mean on snapchat?
What are the different types of errors?
What are the difference between a free-standing and a hosted environment?
What is difference between union All statement and Union?
Explain the advantages of using macro in c language?
Explain the difference between null pointer and void pointer.
What is meant by keywords in c?
Explain why c is faster than c++?
What are called c variables?
How macro execution is faster than function ?
What is a floating point in c?
What is the purpose of & in scanf?