what is the use of getch() function in C program..
difference b/w getch() and getche()??
Answers were Sorted based on User's Feedback
Answer / rahul
getch() is for waiting the o/p screen til we enter the inputs
| Is This Answer Correct ? | 270 Yes | 66 No |
Answer / abhinav
getch() waits for the user to input a character and
displays the output till the user enters a character.As
soon as the user enters a character it transfers the
control back to the main function, without displaying what
character was entered.
getche() does the same thin but it displays the chacter
entered.here e stands for echo.
| Is This Answer Correct ? | 191 Yes | 24 No |
Answer / sasireka
getch() returns to the program after hitting any key.
getche() waits for the character, read it and then returns
to the program
| Is This Answer Correct ? | 102 Yes | 32 No |
Answer / sachin banaya
getch() is used to wait the execution of program on console
unless program will skeep the output witout showing on
console of program in short it all time to user to see
output during the run time of program
| Is This Answer Correct ? | 38 Yes | 16 No |
Answer / phani
getch() is used to read the character,
but getche()is used to read and display character on output.
| Is This Answer Correct ? | 51 Yes | 33 No |
Answer / rashmi
getch() helps in holding the console screen and helps in reading the codes properly
| Is This Answer Correct ? | 15 Yes | 8 No |
Answer / lekha
Both getch() and getche() are used to read single character
there is very little difference
-getch() doesn't 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, you'll 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.............
| Is This Answer Correct ? | 9 Yes | 3 No |
Answer / sudhir tiwari
# 3 getch() returns to the program after hitting any key.
getche() waits for the character, read it and then returns
to the program
| Is This Answer Correct ? | 21 Yes | 17 No |
Answer / svmurali
getch() and getche()
both are getting input charecter to user
but getche() display the that charecter to screen
| Is This Answer Correct ? | 9 Yes | 5 No |
Tell us something about keyword 'auto'.
Tell me the use of bit field in c language?
How to declare a variable?
What are volatile variables?
how can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0
Write a program for the following series? 1 121 12321 1234321 123454321 12345654321 1234567654321 123456787654321 12345678987654321 1234567890987654321 123456789010987654321 12345678901210987654321 1234567890123210987654321 .........1234321............ ..........123454321............ ..........12345654321............ 7 8 9 0 1 Pls............?
How can you find the day of the week given the date?
what is the difference between exit() and _exit() functions?
Explain about the constants which help in debugging?
What is getch?
What is the difference between char array and char pointer?
How can I trap or ignore keyboard interrupts like control-c?