+ 2

Bit some of programs are ended with getch()

19th Nov 2016, 3:36 AM
carl jhonson
2 Antworten
+ 2
getch is a function that take character being entered and store it but some programs ends with it because programs like suppose a program to add two no.s shows a CMD window which asks enter the no.s we enter it the programs accepts it and then closes why because it does show result after input but after that it ends and the output persists for few microseconds so to avoid it we use getch it will show the result and wait for a input to be entered which we aren't using and does not close until it finds the character
19th Nov 2016, 9:54 AM
Sandeep Chatterjee
0
getch () real need is to hold the output screen untill a key is entered from the keyboard otherwise output will come in instant and we r unable to see the output
19th Nov 2016, 12:57 PM
Purusham Gurung
Purusham Gurung - avatar