/* Program 1.12 */ /* keyboard */ /* Used header files */ /* header files */ #include #include /* Main function - our program starts here*/ void main(void) { int key=0; while(1==1) /* ha,ha neverending loooooooooop ! One is always equal to one, surprised? */ { key=getch(); printf("You have pressed the key %c, which has the scan code %d !!!!\n ",(char)key,key); if ((key=='q')||(key=='Q')) break; } /* end of while loop section*/ getch(); } /* our program ends here */