Coding in C : Keyboard

#include <stdio.h>
#include <conio.h>
 
int main (int argc,char *argv[])
{  
    unsigned char key;
    key=cgetc(); // Wait a key
    printf("Ascii code : %c\n",key); /// Display key
}

Be the first to comment

Leave a Reply

Your email address will not be published.


*