Use of kbhit () function..
#include <stdio.h>
#include <conio.h>
int main()
{
char ch;
while (!kbhit())
{
printf("Press any key...\n");
ch = getch();
printf("You have pressed %c.\n",ch);
}
return 0;
}
#include <stdio.h>
#include <conio.h>
int main()
{
char ch;
while (!kbhit())
{
printf("Press any key...\n");
ch = getch();
printf("You have pressed %c.\n",ch);
}
return 0;
}
No comments:
Post a Comment