what is the difference between getch() and getche()?
Answer Posted / beulah david
Both getch() and getche() are used to read single character
there is very little difference
For Example.....
1.
main()
{
getch();
}
after running the above program
when you press any key, you'll exit from output screen
verify the output by pressing alt+F5
will not show anything
OUTPUT : black screen(nothing is displayed)
2.
main()
{
getche();
}
will show the key you were pressed
OUTPUT : u(the cursor waits for sometime untill you press
any key from the keyboard after pressing it immediately goes
to blue screen)
| Is This Answer Correct ? | 15 Yes | 9 No |
Post New Answer View All Answers
What is typedef?
Can one function call another?
Are global variables static in c?
Write a program which returns the first non repetitive character in the string?
I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.
What is the difference between a string and an array?
what is the difference between class and unio?
Does c have class?
What is ambagious result in C? explain with an example.
What is the use of #include in c?
How do I read the arrow keys? What about function keys?
Why is it important to memset a variable, immediately after allocating memory to it ?
Explain how do you determine a file’s attributes?
In C language what is a 'dangling pointer'?
What are the advantages of using new operator as compared to the function malloc ()?