main(){ unsigned c1=0xff,c2=0x00;c1=c2|c1>>2;c2=c1^0236;printf("%x,%x\n”,c1,c2);} 的答案是?A)0x3f,0XA1 B)3f,A1 C)ffff,61 D)3f,a1 这是选项.麻烦一下.要解释的!

来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/14 11:34:35
main(){unsignedc1=0xff,c2=0x00;c1=c2|c1>>2;c2=c1^0236;printf("%x,%x\n”,c1,c2);}的答案是?A)0x3f,0XA1B)3f,

main(){ unsigned c1=0xff,c2=0x00;c1=c2|c1>>2;c2=c1^0236;printf("%x,%x\n”,c1,c2);} 的答案是?A)0x3f,0XA1 B)3f,A1 C)ffff,61 D)3f,a1 这是选项.麻烦一下.要解释的!
main(){ unsigned c1=0xff,c2=0x00;c1=c2|c1>>2;c2=c1^0236;printf("%x,%x\n”,c1,c2);} 的答案是?
A)0x3f,0XA1 B)3f,A1 C)ffff,61 D)3f,a1 这是选项.麻烦一下.要解释的!

main(){ unsigned c1=0xff,c2=0x00;c1=c2|c1>>2;c2=c1^0236;printf("%x,%x\n”,c1,c2);} 的答案是?A)0x3f,0XA1 B)3f,A1 C)ffff,61 D)3f,a1 这是选项.麻烦一下.要解释的!
A)0x3f,0XA1
c1=c2|c1>>2
=0xff|0x00>>2 //先算或|
=0xff>>2
=0x3f
c2=c1^0236
=0x3f^0236 //化为二进制按位异或00111111^10011110=10110001=0xa1
=0xa1