B、程序输出结果是 20
C、程序输出结果是 21
D、程序输出结果是 22
第1题
A.2
B.3
C.5
D.8
第2题
constVACv2; cout<<v1.f()<<v2.f(); return0; } 运行时的输出结果是()。
A.53
B.35
C.55
D.33
第3题
constVACv2; cout<<v1.f()<<v2.f(); return0; } 运行时的输出结果是()。
A.53
B.35
C.55
D.33
第4题
A.53
B.35
C.55
D.33
第5题
A.10
B.16
C.26
D.36
第6题
A.10
B.16
C.26
D.36
第7题
#include<iostream>
usingnamespacestd;
voidf1(int&X,int&y){intz=X;x=y;y=z}
voidf2(intX,inty){intz=x;x=y;y=z}
intmain( ){
intx=10,y=26
f1(x,y);
f2(X,y);
cout<<y<<endl;
return0;
}
运行时的输出结果是( )。
A.10
B.16
C.26
D.36
第8题
A.Base Base
B.Base Derived
C.Derived Base
D.Derived Derived
第9题
A.①②③④
B.①②③
C.②③④
D.①④
第10题
#include<iostream>
Using namespace std;
class A{
public:
virtual void f () {cout+1;}
void g () {cout<<2;}
};
class B:public A{
public:
virtual void f () {cout<<3;}
void g () {ecut<<4;}
};
void show ( A &a ) {a.f ( ) ; a.g ( ) ; }
int main () {
B b;
show ( b ) ;
return 0;
}
运行时的输出结果是
A ) 12
B ) 34
C ) 14
D ) 32
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!