C语言理论作业补

8.int a=7,;int b=8;printf(”%d“,a&b);

7:0.....0  0......0  0.......0  00000111

8:0......0  0......0  0.......0  00001000

都为1时为1,其他为0;所以输出值为:0

9.int a=7;int b=8;printf(”%d“,a^b)

7:0......0  0......0  0......0  00000111

8:0......0  0.......0  0......0   00001000

a^b时不同为1,相同为0.所以输出值为15.

posted @ 2016-09-21 13:29  BGD160809321  阅读(88)  评论(1编辑  收藏  举报