#include stdio.h int main(void) {char ch = 0;scanf(%c, ch);// Read one character
编程学习网为您整理以下代码实例,主要实现:输出字符的数值,希望可以帮到各位朋友。
#include <stdio.h>
int main(voID)
{
char ch = 0;
scanf("%c", &ch); // Read one character
printf("The character is %c\n", ch);
printf("The character is %c and the code value is %d\n", ch, ch);
return 0;
}