下面程序的结果是includeclass A{public:A( ){cout 下面程序的结果是 #include<iostream.h> class A { public: A( ) {cout<<"construtA"<<endl;} virtual~A( ) {cout<<"destructA"<<endl;}}; class B:public A {}; class C:public A {}; cA.constructA destructAB.constructA constructA destructA destructAC.constructA constructA constructA destructA destructA destructAD.constructA onstructA constructA constructA destructA destructA destructA destructA
下面程序的结果是includeclass A{public:A( ){cout<<"construtA"<
下面程序的结果是 #include<iostream.h> class A { public: A( ) {cout<<"construtA"<<endl;} virtual~A( ) {cout<<"destructA"<<endl;}}; class B:public A {}; class C:public A {}; c
A.constructA destructA
B.constructA constructA destructA destructA
C.constructA constructA constructA destructA destructA destructA
D.constructA onstructA constructA constructA destructA destructA destructA destructA
相关考题:
下面程序的运行结果是 include class base{ protected: int a; public: base( ) {c 下面程序的运行结果是#include<iostream.h>class base{protected:int a;public:base( ) {cout < < "0";}};class base l: virtual base{public:base l ( ) {cout < <"1";}};class base 2: virtual base{public:base2 ( ) {cout < <"2";}};class derived: public base 1, public base2{public:derived( ) {cout < < "3";}};void main( ){derive obj;cout < < endl;}A.0123B.3120C.0312D.3012
下面程序的执行结果是______。 include include using namespace std; vo 下面程序的执行结果是______。include<iostream.h>include<iomanip.h>using namespace std;void main(){cout<<setfill('x')<<setw(10);cout<<"Hello"<<endl;}
下面程序的结果是includeclass A{public: A(){cout 下面程序的结果是 #include<iostream.h> class A { public: A(){cout<<"construtA" <<endl;} virtual ~A() {cout << "destructA" <<endl;}}; class B:public A { }; class C:public A { }; class D:public B,public C { }; void main() { Dd;}A.constructAB.constructAC.constmctAD.constmctA destructA constructA constmctA constructA destructA constructA constructA destructA destructA constructA destructA dest
下面程序的输出结果是includeclass A{public: A( ) {cout 下面程序的输出结果是 #include<iostream.h> class A { public: A( ) {cout < < "construtA" < < endl;} Virtual~A( ) {cout < < "destructA" < < endl;}}; class B: public A { }; class C:public A { }; class D:public B,public C { }; void main( ) { D d;}A.constructAB.constructAC.constructAD.constructA destructA constructA constructA constructA destructA constructA constrnctA destructA destructA constructA destructA destructA destructA destrctA destructA destructA
下列程序的运行结果是______。include class Base { public: void f(int x){cout 下列程序的运行结果是______。include<iostream.h>class Base{public:void f(int x){cout<<“Base:”<<x<<endl;});class Derived:public Base{public:void f(char*str){cout<<“Derived:”<<str<<endl;}};void main(void){Base*pd=ne
以下程序的执行结果是______。 include class base { public: virtual void who(){c 以下程序的执行结果是______。include<iostream.h>class base{public:virtual void who(){cout<<"base class"<<endl:}};class derrvel:public base{public:void who(){cout<<"derivel class"<<endl:}};class derive2;public base{public:void who() {cout<<"derive2 class"<<endl;}};void main(){base obj1,*P;derive1 obj2;derive2 obj3:p=obj1;p->who();p=obj2:p->who();p=obj3;p->who();}
下面程序输出的结果为 #include"iostream.h” class A { public: A(){cout<<"CLASSA"<<endl;} ~A() {} }; class B:public A { public: B(){cout<<"CLASS B"<<endl;} ~B(){} }; void main() { A*p; p=new B;A.CLASS A CLASS B CLASS B CLASS BB.CLASS A CLASS B CLASS A CLASS BC.CLASS A CLASS B CLASS BD.CLASS A CLASS B
下面程序的运行结果是()。includeusing namespace std;class A{public: virtual~A() { 下面程序的运行结果是( )。 #include<iostream> using namespace std; class A { public: virtual~A() { cout<<"call A::~A()"<<endl;} }; class B:public A { char * p; public: B(int i) { p=new char[i];} ~B() { delete(p); cout<<"call B::~B()"; } }; void main() { A * a=new B(8); delete a; }A.call B::~B()call A::~A()B.call B::~B()C.call A::~A()D.call A::~A()call B::~B()
以下程序的执行结果是______. include c1ass A { public: virtual void funl () 以下程序的执行结果是______.include<iostream.h>c1ass A{public:virtual void funl () { cout<<"A fun1"<<endl;}virtual void fun2 () {cout<<"A fun2"<<endl;void fun3 () {cout<<" A fun 3 "<<endl:)void fun4 () {cout<<" A fun4 "<<endl:}