what is the difference between getch() and getchar()?
Answer Posted / pinky
getchar() is a function call: it reads in a single
character and waits for the user to hit 'enter key' before
reading the character. This line is included because many
compiler environments will open a new console window, run
the program, and then close the window before you can see
the output. This command keeps that window from closing
because the program is not done yet because it waits for
you to hit enter. Including that line gives you time to see
the program run.
getch() returns back on reading any character(a-z) or any
hit to the keyboard.
| Is This Answer Correct ? | 34 Yes | 12 No |
Post New Answer View All Answers
Is python a c language?
What is memory leak in c?
Why doesnt this code work?
Can a variable be both constant and volatile?
Write a Program to accept different goods with the number, price and date of purchase and display them
write a programe to accept any two number and check the following condition using goto state ment.if a>b,print a & find whether it is even or odd and then print.and a
write a program to print largest number of each row of a 2D array
Why does notstrcat(string, "!");Work?
what is the function of pragma directive in c?
Is stack a keyword in c?
Why isn't any of this standardized in c? Any real program has to do some of these things.
Explain how do you search data in a data file using random access method?
Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.
what does static variable mean?
What is keyword with example?