【题目】学习使用按位与 &
1.程序分析:0&0=0; 0&1=0; 1&0=0; 1&1=1
2.程序源代码:
#include <stdio.h>
int main()
{
int a,b;
a=077;
b=a&3;
printf("The a & b(decimal) is %d \n",b);
b&=7;
printf("The a & b(decimal) is %d \n",b);
return 0;
}
![](https://img-my.csdn.net/uploads/201304/11/1365681077_2683.png)