Showing posts with label Identify Key Press using C program. Show all posts
Showing posts with label Identify Key Press using C program. Show all posts

Friday, December 11, 2015

Identify Key Press using C program


Program #19


Description:
Identify Key Press using C program

int main(){
 char c=' ';
 clrscr();
 printf("\nPlease press a SPACE Bar to EXIT:\n");
 for(;!kbhit();){
    c = getch();
    if (c == ' '){
      return 0;
    } else {
      printf("%c:%d\t",c,c);
    }
 }
 getch();
 return 0;
}


 

Popular Posts