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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!