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 is the code in while loop that returns the output of given code?

1305


Explain how do you search data in a data file using random access method?

691


Is register a keyword in c?

629


any restrictions have on the number of 'return' statements that may be present in a function. a) no restriction b) only 2 return statements c) only 1 return statements d) none of the above

650


Write a program to print ASCII code for a given digit.

679






What is substring in c?

632


What are the types of data files?

723


Declare the structure which contains the following members and write in C list of all students who score more than 75 marks. Roll No, Name, Father Name, Age, City, Marks.

679


any "C" function by default returns an a) int value b) float value c) char value d) a & b

660


write a c program to calculate sum of digits till it reduces to a single digit using recursion

2716


`write a program to display the recomended action depends on a color of trafic light using nested if statments

1629


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

4898


What is the process to generate random numbers in c programming language?

604


Why dont c comments nest?

613


what is the difference between 123 and 0123 in c?

716