#include "stdio.h"
main()
{
int a,b;
a=077;
b=a&3;
printf("40: The a & b(decimal) is %d
",b);
b&=7;
printf("40: The a & b(decimal) is %d
",b);
}
【程序52】题目:学习使用按位或 | 。1.程序分析:0|0=0; 0|1=1; 1|0=1; 1|1=12.程序源代码:#include "stdio.h"
main()
{
int a,b;
a=077;
b=a|3;
printf("40: The a & b(decimal) is %d
",b);
b|=7;
printf("40: The a & b(decimal) is %d
",b);
}