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
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
What are the different types of constants?
Describe static function with its usage?
how can i write a program that prints out a box such that whenever i press any key8(coordinate number) on the keyboard, the box moves.
How can I dynamically allocate arrays?
What is the use of typedef in c?
What is the Purpose of 'extern' keyword in a function declaration?
Explain what is output redirection?
What is the argument of a function in c?
What is c mainly used for?
What is the difference between union and structure in c?
Can you assign a different address to an array tag?
If you know then define #pragma?
What is the difference between exit() and _exit() function in c?
Explain how does free() know explain how much memory to release?