The function getch() gets a character from console but does not echo(print) to the screen. getch() reads a single character directly from the keyboard, without echoing to the screen. For this functionality we can use this function to hold output window until hit any key from keyboard.
In the program, when we press any key from keyboard we’ll see the next line but won’t see the key which is pressed. For the last getch() function, the output window will be held until press any character for keyboard.