学习使用|运算符

#include<stdio.h>
int main()
{        /*练习使用|运算符
            0|0=0 0|1=1 1|0=1 1|1=1*/
    int a, b;
    a=077;
    b=a|3;
    printf("\40:the a|b (decimal)is %d\n",b);
    b|=3;
    printf("\40:the a|b(decimal)is %d\n",b);
    getch();
    return 0;
}

posted @ 2013-03-03 19:03  王井玉  阅读(121)  评论(0编辑  收藏  举报