0
What is use of getch( ) and putch()
somebody told me its use is to print string name with spaces instead of using underscore with cin but some code have getch() at end . what that means , please give example too if possible I have viva on Tomorrow and I am lagging on module.
2 Answers
0
getch() will get a character from standard input but doesnt display on the screen. getche() gets a character and displays on screen.
putch() will print a character to standard output
getch at the end is because if you dont use it, program will run, show output, and output console will close after that because program execution is complete. to wait for user to read the output, getch is must. program will close only after a key press in this case
0
thanks bro