linksphoto
2022-07-03 11:58
#include <stdio.h>
int main()
{
char c = 'a';
int n = 97 //将c赋值给n
float f = 97.000000 //将c赋值给f
double d = 97.000000 //将c赋值给d
printf("%d\n",n);
printf("%f\n",f);
printf("%f\n",d);
return 0;
}
#include <stdio.h>
int main()
{
char c = 'a';
int n = 97; //当一句可执行语句结束的时候末尾需要有分号
float f = 97.000000; //同上
double d = 97.000000; //同上
printf("%d\n",n);
printf("%f\n",f);
printf("%f\n",d);
return 0;
}
char c = 'a';
int n = c=97; //将c赋值给n
float f = c; //将c赋值给f
double d = c; //将c赋值给d
C语言入门
926288 学习 · 20799 问题
相似问题