#include main() { unsigned char a=8,c; c=a>>3; printf("%d\n",c); } 程序这里的a是字符型变量,赋给它8,为什么是整形十进制的8,而不是ACSII码呢?

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/13 09:20:05

#include main() { unsigned char a=8,c; c=a>>3; printf("%d\n",c); } 程序
这里的a是字符型变量,赋给它8,为什么是整形十进制的8,而不是ACSII码呢?

要是你想赋值字符8的话得用 ‘8’ (单引号) 否则8就表示数字8