Getch function >> conio.h Header file >> Library Functions in C Programming
What it does :
- Getch accepts character from console (keyboard)
- Character accepted does not echoes to the screen [not displayed on screen ]
- Char entered is not displayed on the screen .
- It waits untill it gets a input so it can be used as a screen stopper
- Header File : conio.h
int getch(void);
Live Examples :
#include"stdio.h"
#include"conio.h"
void main(void)
{
char ch;
printf("Hello"); // Screen is paused until we input a character
getch();
}
Output :
Hello // character accepted by getch is not displayed