black

登录

单项选择题

有如下程序:
#include<iostream>
using namespace std;
class test{
private:
int a;
public:
test(){cout<<"constructor"<<endl;}
test(int a){cout<<a<<endl;}
test(const test &_test){
a=_test.a;
cout<<"copy constructor"<<endl;
}
~test(){cout<<"destructor"<<endl;}
};
int main(){
test A(3);
return 0;
}
执行这个程序的输出结果是______。

A.3
B.constructordestructor
C.copy constructordestructor
D.3destructor
相关考题

单项选择题 在多继承中,公有派生和私有派生对于基类成员在派生类中的可访问性与单继承的规则____。

单项选择题 同一概念在一处为实体而在另一处为属性或联系的冲突在视图集成中称为______。

单项选择题 下列字符串中,正确的C++标识符是____。

All Rights Reserved 版权所有©PP题库网库(pptiku.com)

备案号:湘ICP备14005140号-5

经营许可证号:湘B2-20140064