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


Please Help Members By Posting Answers For Below Questions

What do you mean by Recursion Function?

823


What is the best organizational structure?

840


What does int main () mean?

724


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

827


What is register variable in c language?

781






Is c is a high level language?

812


Using which language Test cases are added in .ptu file of RTRT unit testing???

3933


What is line in c preprocessor?

768


Do pointers take up memory?

825


What are the salient features of c languages?

810


How can I remove the trailing spaces from a string?

782


How do I copy files?

785


Why is c fast?

779


Describe the order of precedence with regards to operators in C.

810


What is header file definition?

788