有如下程序:
#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;

运行时输出的结果是( )。

题库:计算机等级考试 类型:最佳选择题 时间:2017-07-03 14:23:38 免费下载:《单项选择》Word试卷

有如下程序:
#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.constructor
C.destructor
D.copyconstructor
E.Destructor
F.3
G.destructor

有如下程序:  #include <iostream>  using namespace std;  class test  private:  int a;

本题关键词:程序,有序镜检,工程施工程序,复苏程序,工作程序,建设程序,程序变更,程序冲突,点火程序,生产程序;

微信扫码获取答案解析
下载APP查看答案解析