char c1,c2; c1=197; c2=198; printf("c1=%c,c2=%c\n",c1,c2); printf("c1=%d,c2=%d\n",c1,c2); return 0;#include int main(){char c1,c2;c1=197;c2=198;printf("c1=%c,c2=%c\n",c1,c2); printf("c1=%d,c2=%d\n",c1,c2);return 0;}运行后为什么是C1=?,C

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/29 01:42:48
charc1,c2;c1=197;c2=198;printf("c1=%c,c2=%c\n",c1,c2);printf("c1=%d,c2=%d\n",c1,c2);return0;#include

char c1,c2; c1=197; c2=198; printf("c1=%c,c2=%c\n",c1,c2); printf("c1=%d,c2=%d\n",c1,c2); return 0;#include int main(){char c1,c2;c1=197;c2=198;printf("c1=%c,c2=%c\n",c1,c2); printf("c1=%d,c2=%d\n",c1,c2);return 0;}运行后为什么是C1=?,C
char c1,c2; c1=197; c2=198; printf("c1=%c,c2=%c\n",c1,c2); printf("c1=%d,c2=%d\n",c1,c2); return 0;
#include
int main()
{
char c1,c2;
c1=197;
c2=198;
printf("c1=%c,c2=%c\n",c1,c2);
printf("c1=%d,c2=%d\n",c1,c2);
return 0;
}
运行后为什么是C1=?,C2=?
C1=-59,C2=-58,

char c1,c2; c1=197; c2=198; printf("c1=%c,c2=%c\n",c1,c2); printf("c1=%d,c2=%d\n",c1,c2); return 0;#include int main(){char c1,c2;c1=197;c2=198;printf("c1=%c,c2=%c\n",c1,c2); printf("c1=%d,c2=%d\n",c1,c2);return 0;}运行后为什么是C1=?,C
char类型的范围是 -128-127
unsigned char类型的范围是 0-255
你定义的超出范围了,溢出了.