answersLogoWhite

0

getch() takes one char from keyboard but it will be invisible to us. in other words we can say that it waits until press any key from keyboard.

getch() is a function which has its protype defined in conio.h header file.

it is basically used to take input a single characterfrom keyboard. and this char is not displayed at the screen.

it waits until itn gets a input that's why it can be used as a screen stopper.

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

What is the return value of getch?

getch(); is used for unbuffered input. e.x: int main() { char num=0; printf("Press a keyboard button: "); num = getch(); //This brings in 1 character that the user pressed on the keyboard printf("\nYou pressed: %c", num); //This prints the character you pressed getchar(); // I am using getchar(); to stop the program from ending after pressing buttons return 0; } My input will be within the (). output: Press a keyboard button: (v) You pressed: v EOP //End of program I hope this has helped you!


Why wont your c plus plus program stay open?

If you are talking about the program executing, but the output screen being displayed for a flash and then disappearing, I suggest adding getch() or getchar() function at the end of your main function. This will make sure that the output screen waits for you to press a character before the program terminates.


What is the first line of every FORTRAN program and what does it tell the compiler?

The name of the program. For example: program sum ! This is a comment. Your program's code goes here... end program sum


Write a program with a loop that lets the user enter a series of integers the user should enter -99 to signal the end of the series after the program should display the largest and smallest.?

#include<iostream.h> #include<conio.h> main() { int i,j; i=0; j=0; for(i=1;i<=5;i++) { if(i>j){ cout<"the value of i is="<<i; } else { cout<<"the value of j is="<<j; } } getch(); }


What command statement terminates the qbasic program?

END '...END of program/halt program code execution. *NOTE*: There should be only 'one' END statement written inside of a QBASIC program. I have seen example code where they use multiple END statements; this is wrong!

Related Questions

What is the return value of getch?

getch(); is used for unbuffered input. e.x: int main() { char num=0; printf("Press a keyboard button: "); num = getch(); //This brings in 1 character that the user pressed on the keyboard printf("\nYou pressed: %c", num); //This prints the character you pressed getchar(); // I am using getchar(); to stop the program from ending after pressing buttons return 0; } My input will be within the (). output: Press a keyboard button: (v) You pressed: v EOP //End of program I hope this has helped you!


Why wont your c plus plus program stay open?

If you are talking about the program executing, but the output screen being displayed for a flash and then disappearing, I suggest adding getch() or getchar() function at the end of your main function. This will make sure that the output screen waits for you to press a character before the program terminates.


What is the first line of every FORTRAN program and what does it tell the compiler?

The name of the program. For example: program sum ! This is a comment. Your program's code goes here... end program sum


What is Used to end a locked up program?

task manager


What is difference between stop and end in GWbasic?

The end command is used to end the program whereas the stop command is used to break the loop like ctrl+c. After running the program it will come as break in 20 or whatever


The stated commitment of this program was that every child would be able to read by the end of third grade?

no child left behind


The stated commitment of this program was that every child would be able to read by the end of third grade.?

no child left behind


Write a program with a loop that lets the user enter a series of integers the user should enter -99 to signal the end of the series after the program should display the largest and smallest.?

#include<iostream.h> #include<conio.h> main() { int i,j; i=0; j=0; for(i=1;i<=5;i++) { if(i>j){ cout<"the value of i is="<<i; } else { cout<<"the value of j is="<<j; } } getch(); }


What command statement terminates the qbasic program?

END '...END of program/halt program code execution. *NOTE*: There should be only 'one' END statement written inside of a QBASIC program. I have seen example code where they use multiple END statements; this is wrong!


How do you sayspell please talk to me in Korean?

By saying every word with a EAN at the end of every word By saying every word with a EAN at the end of every word By saying every word with a EAN at the end of every word By saying every word with a EAN at the end of every word By saying every word with a EAN at the end of every word By saying every word with a EAN at the end of every word


What kind of program was the mercury program?

the world is going to end


The beginning of every entertity the end of time and space the begging of every end and the end of every place what am i?

The Letter E