C语言or和and运算
- #include<stdio.h>
- voidmain()
- {
- printf("0|0is%d\n",0|0);
- printf("0|1is%d\n",0|1);
- printf("1|1is%d\n",1|1);
- printf("1|2is%d\n",1|2);
- printf("128|127is%d\n",128|127);
- }
- #include<stdio.h>
- voidmain()
- {
- printf("0&0is%d\n",0&0);
- printf("0&1is%d\n",0&1);
- printf("1&1is%d\n",1&1);
- printf("1&2is%d\n",1&2);
- printf("15&127is%d\n",15&127);
- }
本文出自 “阿凡达” 博客,请务必保留此出处http://shamrock.blog.51cto.com/2079212/878524