网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
若有以下程序段:
int a=0,b=0,c=0;
c=(a-=a-5,a=b,b+3);
cout<<a<<","<<b<<","<<c<<endl;
其输出结果是
A.3,0,-10
B.0,0,3
C.-10,3,-10
D.3,0,3
参考答案
更多 “ 若有以下程序段:int a=0,b=0,c=0;c=(a-=a-5,a=b,b+3);cout<<a<<","<<b<<","<<c<<endl;其输出结果是A.3,0,-10B.0,0,3C.-10,3,-10D.3,0,3 ” 相关考题
考题
若有以下程序段:include using namespace std;int main (){ int a[]={1,4,5}; int *p
若有以下程序段: #include <iostream> using namespace std; int main () { int a[]={1,4,5}; int *p=a[0],x=6, y,z; for (y=0; y<3; y++) z= ( (* (p+y) <x) ? *(p+y) :x); cout<<z<<end1; return 0; } 程序运行后的输出结果是( )。A.1B.4C.5D.2
考题
若有以下程序:include using namespace std;int f(){static int i = 0;int s = 1;s+=
若有以下程序: #include <iostream> using namespace std; int f() { static int i = 0; int s = 1; s+=i; i++; return s; } int main() { int i,a = 0; for(i = 0;i<5;i++) a+=f(); cout<<a<<endl; return 0; } 程序运行后,输出的结果是A.20B.24C.25D.15
考题
若有以下程序: include using namespace std;int f(){static int i = 0;ints= 1;s+=i
若有以下程序: #include <iostream> using namespace std; int f() { static int i = 0; ints= 1; s+=i; i++; return s; } int main() { int i,a = 0; for(i = 0;i<5;i++) a+=f(); cout<<a<<endl; return 0; } 程序运行后,输出的结果是A.20B.24C.25D.15
考题
若有以下程序段: int a=0,b=0,c=0; c=(a-=a-5),(a=b,b+3); cout<<a<<","<<b<<","<<c<<endl; 其输出结果是A.3,0,-10B.0,0,5C.-10,3,-10D.3,0,3
考题
若有以下程序:includeusing namespace std;int main(){ int a=3; cout
若有以下程序: #include <iostream> using namespace std; int main() { int a=3; cout<<(a+=a-=a+A) <<end1; return 0; } 程序执行后的输出结果是( )。A.-6B.12C.0D.-12
考题
若有以下程序:includeusing namespace std;class TestClass{public:void who(){cout
若有以下程序: #include<iostream> using namespace std; class TestClass { public: void who(){cout<<"TestClass"<<endl;} }; class TestClass1:public TestClass { public: void who(){cout<<"TestClass1"<<endl;} }; int main() { TestClass *p; TestClass1 obj1; P=obj1; P->who(); return 0; 则该程序运行后的输出结果是( )。A.TestClass1B.TestClassC.0D.无输出
考题
若有以下程序段: int a=0,b=0,c=0; c=(a-=a-5),(a=b,b+3); printf(“%d,%d,%dn”,a,b,c); 执行后的输出结果是().A.3,0,-10B.0,0,5C.-10,3,-10D.3,0,3
考题
18、有如下程序段: int a=6,b=0,c=0; for(;a(b==0);) { b+=a; a-=++c; } cout<<a<<'\t'<<b<<'\t'<<c<<endl; 运行后输出结果是() A.6 0 0 B.5 6 0 C.6 6 1 D.5 6 1A.6 0 0B.5 6 0C.6 6 1D.5 6 1
考题
以下程序段的输出结果是() int a=0,b=0,c=0; c=(a-=a-5),(a+b,b+3); printf(“%d,%d,%dn”,a,b,c);A.3,0,-10B.0,0,5C.-10,3,-10D.3,0,3
热门标签
最新试卷