网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
有以下程序: voidmain( ) {inta=5,b=4,c=3,d=2; if(a>b>c) cout<<d<<endl; elseif((C-1>=d)==1) cout<<d+1<<endl; else cout<<d+2<<endl; }
A.2
B.3
C.4
D.编译时有错,无结果
参考答案
更多 “ 有以下程序: voidmain( ) {inta=5,b=4,c=3,d=2; if(abc) coutdendl; elseif((C-1=d)==1) coutd+1endl; else coutd+2endl; }A.2B.3C.4D.编译时有错,无结果 ” 相关考题
考题
有以下程序includemain(){int a=5,b=lt; t=(a
有以下程序 #include<stdio.h> main() { int a=5,b=lt; t=(a<<2)|b;printf("%d\n",t); } 程序运行后的输出结果是______。A.21B.11C.6D.1
考题
若有以下程序:inclcudevoid main(){int i;int a[3][3]={'1','2','3','4','5','6','
若有以下程序: #inclcude<iostream.h> void main() { int i; int a[3][3]={'1','2','3','4','5','6','7','8','9'); for(i=0;i<3;i++) cout<<a[i][i]<<" "; cout<<endl; } 执行后的输出结果是( )A.50 53 56B.49 52 55C.2 5 8D.1 4 7
考题
下列表达式结果为“真”的是A.2 #gt# 3 #and# 4 #gt# 2 ;B.2 #lt# 3 #and# 4 #lt# 2 ;C.2 #gt# 3 #and# 4 #lt# 2 ;D.2 #lt# 3 #and# 4 #gt# 2;
考题
7、已知lt=[1,2,3],下面表达式能够修改lt为[1,2,3,4]的是A.lt+=4B.lt.append(4)C.lt.insert(3,4)D.lt.insert(-1,4)
考题
3、以下程序运行后的输出结果是 。 (条件表达式的多样性) #include<iostream> using namespace std; void main() { int a = 3, b = 4, c = 5, t = 99; if(b) if(a) cout<<a<<b<<t<<endl; else cout<<a<<b<<c<<endl; }
热门标签
最新试卷