Why use getch () in program? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Why use getch () in program?

c program

13th Feb 2017, 4:25 PM
Ram Naresh Arya
Ram Naresh Arya - avatar
2 Answers
0
getch() is used to get a character from console but does not echo to the screen.
13th Feb 2017, 4:36 PM
Michael W
Michael W - avatar
0
getch() is used to fetch the character entered on keyboard, it does not display what we typed. During the runtime it runs and shows the output only for a fraction of seconds, to keep the output screen on console getch() function literally makes the output screen to wait until any key is pressed. So with it you can see the output.
13th Feb 2017, 5:55 PM
G.S.N.V. Suraj
G.S.N.V. Suraj - avatar