main()
{
int a,b;
a=077;
b=a&3;
printf("\40: The a & b(decimal) is %d \n",b);
b&=7;
printf("\40: The a & b(decimal) is %d \n",b);
}
-----------------------------------------------------------------------------
【程序52】
题目:学习使用按位或 | 。
1.程序分析:0|0=0; 0|1=1; 1|0=1; 1|1=1
2.程序源代码:
#include "stdio.h"
main()
{
int a,b;
a=077;
b=a|3;
printf("\40: The a & b(decimal) is %d \n",b);
b|=7;
printf("\40: The a & b(decimal) is %d \n",b);
}
-----------------------------------------------------------------------------
【程序53】
题目:学习使用按位异或 ^ 。
1.程序分析:0^0=0; 0^1=1; 1^0=1; 1^1=0
2.程序源代码:
#include "stdio.h"
main()
{
int a,b;
a=077;
b=a^3;
printf("\40: The a & b(decimal) is %d \n",b);
b^=7;
printf("\40: The a & b(decimal) is %d \n",b);
}
http://www.changsha.cn/bj/yl/ylzx/2014/0328/538711.html
http://www.fengone.com/bj/jsqy/2014/0328/432366.html
http://www.lfxww.com/2014/shichangshangxun/2014/0328/746735.html
http://www.changsha.cn/bj/yl/xywy/2014/0328/538777.html
http://www.changsha.cn/bj/yl/xywy/2014/0328/539819.html
http://www.js0573.com/yx/jsfs/3685508.html
http://www.changsha.cn/bj/yl/xywy/2014/0328/539839.html
http://www.fengone.com/bj/zxzx/2014/0328/433447.html
http://zx.zynews.com/hyzx/yskt/5227419503.html
http://www.changsha.cn/bj/yl/xywy/2014/0328/539856.html
http://www.changsha.cn/bj/bj/zxzx/2014/0328/540917.html
http://zx.zynews.com/hyzx/yskt/5229424961.html
http://zx.zynews.com/hyzx/yskt/5227745464.html
http://www.changsha.cn/bj/yl/ylzx/2014/0328/540919.html
http://zx.zynews.com/hyzx/yskt/5227941177.html
http://www.changsha.cn/bj/yl/xywy/2014/0328/541295.html
http://www.zznews.cn/hyzx/xywy/5228934861.html
http://www.changsha.cn/bj/yl/zxjs/2014/0328/543884.html
http://zx.zynews.com/hyzx/yskt/5228224939.html
http://www.changsha.cn/bj/yl/zxjs/2014/0328/543885.html
http://www.fengone.com/bj/zxzx/2014/0328/436776.html
http://www.changsha.cn/bj/yl/xywy/2014/0328/543296.html
http://zx.zynews.com/hyzx/yskt/5228547595.html
http://www.changsha.cn/bj/yl/ylzx/2014/0328/543297.html
http://www.zznews.cn/hyzx/xywy/5229007011.html
http://www.lfxww.com/2014/shichangshangxun/2014/0328/747825.html
http://www.changsha.cn/bj/yl/ylzx/2014/0328/543298.html
http://zx.zynews.com/hyzx/yskt/5228958725.html
http://www.changsha.cn/bj/yl/xywy/2014/0328/543887.html
http://zx.zynews.com/hyzx/yskt/5229496032.html