0
Use of getch(); in c
what is the use of getch(); in c
5 Answers
+ 20
It is generally used the read the characters from the screen
void main() {
char ch;
ch = getch();
printf("Input char is :%c",ch);
}
Also,
When u write a program and run it...
Without getch() the program will be completed at the instant you run it..
We don't want that to happen so we use getch()
getch() indicates getting a char as a input before the program actually runs..
Thus when you run it.. it won't start until you press something from the keyboard (say)
+ 8
getch() is a function whose declaration is there in conio.h header file .
It is used to input a single character from the user and therefore is sometimes used at the end of the program to hold the output screen.
+ 2
thanks for all