char c;. int ascii;. printf("Enter a character: ");. scanf("%c", &c);. // %d prints the integer value of character i.e. ASCII value in this case.
確定! 回上一頁