C++入门经典-例2.13-左移运算

1:代码如下:

// 2.13.cpp : 定义控制台应用程序的入口点。
//




#include "stdafx.h"
#include<iostream>
using namespace std;
void main()
{
    
    int a=0x40,b;
    b=a<<1;//左移1位
    cout << b << endl;//以十进制输出
}
View Code

运行结果:

posted @ 2017-09-11 16:53  一串字符串  阅读(228)  评论(0编辑  收藏  举报