What is the difference between getch() and getche()?

Questions by harsha_yhvr

Showing Answers 1 - 1 of 1 Answers

SRIDHAR YADAV P.V.

  • Dec 24th, 2012
 

Both getch() and getche() are used to read single character there is very little difference
-getch() doesnt 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, youll 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.............

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions