C 练习实例52

C 语言教程 · 2019-02-22 06:58:34

题目:学习使用按位或 |。

程序分析:0|0=0; 0|1=1; 1|0=1; 1|1=1 。

程序源代码:

//  Created by www.codercto.com on 15/11/9.
//  Copyright © 2015年 码农教程. All rights reserved.
//

#include<stdio.h>
int main()
{
    int a,b;
    a=077;
    b=a|3;
    printf("b 的值为 %d \n",b);
    b|=7;
    printf("b 的值为 %d \n",b);
    return 0;
}

以上实例输出结果为:

b 的值为 63 
b 的值为 63  

点击查看所有 C 语言教程 文章: https://www.codercto.com/courses/l/17.html

查看所有标签

Web Data Mining

Web Data Mining

Bing Liu / Springer / 2006-12-28 / USD 59.95

Web mining aims to discover useful information and knowledge from the Web hyperlink structure, page contents, and usage data. Although Web mining uses many conventional data mining techniques, it is n......一起来看看 《Web Data Mining》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

html转js在线工具
html转js在线工具

html转js在线工具

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具