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

write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.

2455


Some coders debug their programs by placing comment symbols on some codes instead of deleting it. How does this aid in debugging?

655


What is the use of bitwise operator?

687


How many types of operator or there in c?

602


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

592






In C language, a variable name cannot contain?

743


How can I call a function with an argument list built up at run time?

637


Explain can the sizeof operator be used to tell the size of an array passed to a function?

595


What is a good data structure to use for storing lines of text?

593


Who is the main contributor in designing the c language after dennis ritchie?

551


Explain what are binary trees?

611


what are the advantages of a macro over a function?

645


How can I invoke another program (a standalone executable, or an operating system command) from within a c program?

653


Disadvantages of C language.

656


Write a program to generate the Fibinocci Series

659