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

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 07:31:36

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

#include main() { unsigned char a=8,c; c=a>>3; printf("%d\n",c); } 程序这里的a是字符型变量,赋给它8,为什么是整形十进制的8,而不是ACSII码呢?
要是你想赋值字符8的话得用 ‘8’ (单引号) 否则8就表示数字8