Question: run this code and show result #include #include int main() { char i; int y = 0; while(1) { if(!(kbhit())) { y = 0; printf(
run this code and show result
#include
#include
int main() {
char i;
int y = 0;
while(1) {
if(!(kbhit())) {
y = 0;
printf(" key is not pressed");
//do what you want
}
else {
printf(" key pressed (execution pause), press again to resume");
i = getch();
if (i == 'p') {
printf(" Information or action to be performed when 'p' is pressed");
}
y = 1;
}
if(y == 1) {
getch();
}
}
return 0;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
