网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
语句:printf("%dn",12&012);的输出结果是()
A.12
B.8
C.6
D.012
参考答案和解析
B 解析:位运算12&012即1100&1010,结果是1000,转化成十进制数是8,所以,输出结果是8。
更多 “语句:printf("%dn",12012);的输出结果是()A.12B.8C.6D.012” 相关考题
考题
语句“printf(”a\bhow\’are\’y\\\bou\n”);”的输出结果是( )。A)a\bhow\'are\'y\\bouB)a\bhow\’are\’y\bouC)how'are'youD)ahow'are'y\bou
考题
以下语句段执行后的输出结果是()。includemain(){int k=3;if(k)printf("")elseprint
以下语句段执行后的输出结果是( )。 #include<stdio.h> main() {int k=3; if(k) printf("###") else printf("");}A.###B.C.###D.有语法错误,不能执行
考题
有以下程序main(){ int i; for(i=0;i3;i++) switch(i) { case 1: printf("%d",i); case 2: printf("%d",i); default: printf("%d",i); }}程序执行后的输出结果是A.011122 B.012C.012020 D.120
考题
有以下程序:includemain(){int x=102,y=012; printf("%2d,%2d\n",x,y);}执行后的输出
有以下程序: #include <stdio.h> main() { int x=102,y=012; printf("%2d,%2d\n",x,y); } 执行后的输出结果是( )。A.10,01B.02,12C.102,10D.02,10
考题
单选题有以下程序:
#include
main()
{
charch='B';
while(ch'E')
{
printf(%d,ch-'A');
ch++;
}
printf();
}
程序运行后的输出结果是( )。A
123B
ABCC
abcD
012
考题
单选题设有说明语句:int x=1;,语句printf(“%d/n”,-x++);的输出结果是()A
-1B
0C
1D
2
热门标签
最新试卷