Read a character from console window.
Display its ASCII code.
The %d displays that value instead of a character value.
#include <stdio.h> int main()/*from w w w. ja v a 2 s . com*/ { int c; printf("I'm waiting for a character: "); c = getchar(); printf("I waited for the '%d' character.\n",c); return(0); }