题目内容

运行下列程序时的输出结果是( )。#includeusing namespace std;class A{public:A(){cout<<"A";}A(int){cout<<"B";}A(A &){cout<<"C";}};int main(){A *p,a(1),b;p=new A;cout<

ABAA
BAA
C. ABC
D. ABAC

查看答案
更多问题

运行下列程序时的输出结果是( )。#include using namespace std;class A{public:A( ) { cout<<"A"; }~A( ) { cout<<"~A"; }};class B{public:B( ) { cout<<"B"; }~B( ) { cout<<"~B"; }};class C{B b;A a;public:C( ) { cout<<"C"; }~C( ) { cout<<"~C"; }};int main(void){C c;system("pause");return 0;}

A. BAC~C~A~B
BAC~B~A~C
C. ABC~C~B~A
D. C~C

运行下列程序时的输出结果是( )。#includeusing namespace std;class A{int a;public:A(int t){ a=t; cout<

A. 3625
B. 6352
C. 6325
D. 3652

运行下列程序时的输出结果是( )。#includeusing namespace std;class Myclass{public:void show( )const{ cout<<'A'; }void show( ) { cout<<'B'; }};int main(){const Myclass t1;Myclass t2;t1.show();t2.show();cout<

AA
B. AB
C. BA
D. BB

The meeting _______ next week is sure to be a great success.

A. to hold
B. to be held
C. to have held
D. being held

答案查题题库