选择题
有以下程序
#include <stdio.h>
main()
{
int a=5,b=1,t;
t=(a<<2)|b;
printf('%d\n',t);
}
程序运行后的输出结果是______。
A、
6
B、
11
C、
21
D、
1
【正确答案】
C
【答案解析】
a<<2的值为20,20|1结果为21,所以答案选择C。
提交答案
关闭