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

Answers were Sorted based on User's Feedback



what is the difference between getch() and getche()?..

Answer / m.karthiga

the getch() does not echo any characters. but getche()
should echo the characters

Is This Answer Correct ?    67 Yes 7 No

what is the difference between getch() and getche()?..

Answer / rama krishna sidhartha

Here are some examples for getch() and getche() to distinguish :

Example for getch() :

main()
{
getch();
}
OUTPUT : black screen(nothing is displayed)

Example for getche() :

main()
{
getche();
}
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 ?    40 Yes 10 No

what is the difference between getch() and getche()?..

Answer / azad sable,chiplun.

The 'e' in getche() fuction means it echoes(display) the
character that you typed to the screen.As against it ,getch
()just returns the character that that you typed without
echoing it on the screen.

Is This Answer Correct ?    25 Yes 2 No

what is the difference between getch() and getche()?..

Answer / 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

what is the difference between getch() and getche()?..

Answer / ayaskanta

getch is used to get a character from keyboard. once a key
is pressed it goes back to blue screen. In the case of
getche the compiler waits for you to press ENTER after you
have entered another character through keyboard.

Is This Answer Correct ?    14 Yes 9 No

what is the difference between getch() and getche()?..

Answer / umer khan

getch() is a library file to #include <conio.h> which is mostly used in stidios compiler......
while getche() takes input frm the user withtout presing '\r'

Is This Answer Correct ?    3 Yes 5 No

what is the difference between getch() and getche()?..

Answer / rambabu

these two are different where the difference is identified
as when we r using getch() for get the echo output it is
black screen and as well as getche() it containsa blue screen

Is This Answer Correct ?    7 Yes 15 No

Post New Answer

More C Interview Questions

What is the difference between null pointer and void pointer

10 Answers   CTS, Manforce, MAQ Software,


write aprogram for There is a mobile keypad with numbers 0-9 and alphabets on it. take input of 7 keys and then form a word from the alphabets present on those keys.

1 Answers   iGate, Shashi, Source Bits, Subex,


What is meant by high-order and low-order bytes?

0 Answers  


what is the function of .h in #include<stdio.h> in c ?

23 Answers   HCL, IBM, Wipro,


What the advantages of using Unions?

0 Answers   TISL,






How can I discover how many arguments a function was actually called with?

0 Answers  


What is array in c with example?

0 Answers  


#define DCHAR char* typedef char* TCHAR; if using these following variables will be declared like DCHAR ch1, ch2; TCHAR ch3, ch4; then what will be types of ch1, ch2, ch3 and ch4?

6 Answers   NDS,


how to find sum of 5 digits in C?

4 Answers  


Difference between constant pointer and pointer to a constant.

0 Answers   Huawei,


What's wrong with "char *p = malloc(10);" ?

4 Answers  


Sir i need notes for structure,functions,pointers in c language can you help me please

0 Answers   TCS,


Categories