qq_慕圣7419269
2019-05-10 16:52
#include <stdio.h>
int main()
{
char c = 'a';
int n = c; //将c赋值给n
float f = c; //将c赋值给f
double d = c; //将c赋值给d
printf("%d\n",n);
printf("%f\n",f);
printf("%lf\n",d);
return 0;
}
'a'是字符吧?不太懂
char c = 'a';//在ASCII表中‘a’所对应的数值为 97
97是a的ASCII对应值
C语言入门
926866 学习 · 21114 问题
相似问题