char a = 100; char b = 150; unsigned char c ; c =(a < b)?a:b; 请问c的值为

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/26 07:27:50
char a = 100; char b = 150; unsigned char c ; c =(a < b)?a:b; 请问c的值为
x)KH,RHTU040V@

char a = 100; char b = 150; unsigned char c ; c =(a < b)?a:b; 请问c的值为
char a = 100; char b = 150; unsigned char c ; c =(a < b)?a:b; 请问c的值为

char a = 100; char b = 150; unsigned char c ; c =(a < b)?a:b; 请问c的值为
因为char是有符号的,而b已经超出char的上限127,所以b在比较时被当作是-106.
所以,a是大于b的,最后一条的(a