class A { int hum; public: A(int i){nuln=i;} A(A&
A.{num=a.num十+;} void print{eout(<hum;} }; void main A a(1),b(
A.; a.print; A print;
A.11
B.12
C.21
D.22
[单选题]下面程序的运行结果为()。includeclass A{int numpublic:A(int i){num=i;}A(A&a下面程序的运行结果为( )。 #include<iostream.h> class A { int num public: A(int i){num=i;} A(A&a){Bum=a.num++;} void print(){cout<<Bum;} }; void main() { A a(1),b(a); A. print(); B.print(); }
[单选题]下面程序的运行结果为includeclass A{ int num;public: A(int){num=i;} A(ABm){num下面程序的运行结果为 #include<iostream.h> class A { int num; public: A(int){num=i;} A(ABm){num=a.num++;} void print(){cout<<num;} }; void main() { Aa(1),b(a); a.print(); b.print(); }A.11B.12C.2
[单选题]下面程序的运行结果为includeclass A{int num;public:A(int i){num=i;}A(A &a)下面程序的运行结果为 #include<iostream.h> class A { int num; public: A(int i){num=i;} A(A &a) { num = a.num+ +;} void print( ) {cout << num;} }; void main( 0 { A a (1),b (a) ; a.print( ); b
[单选题]下面程序的运行结果为includeclass A{static int n;public: A(){n=1;} A(intnum){n下面程序的运行结果为 #include<iostream.h> class A { static int n; public: A(){n=1;} A(intnum){n=num;} void print(){cout <<n;} }; int A∷n=2; void main() { Aa,b(3); a.print(); b.print(); cout <<e
[单选题]下面程序的运行结果为includeclass A{public: A( ){cout<<"1";}~A( ){cout<<"2";}}下面程序的运行结果为 #include<iostream.h> class A { public: A( ){cout<<"1";} ~A( ){cout<<"2";} }; class B:public A { public: B( ){cout<"3";} ~B( ){cout<<"4";} }; void main( ) { BA.1
[单选题]下面程序的运行结果为includeclass A{public:A(){cout<<"1";} ~A(){cout<<"2";}};C下面程序的运行结果为 #include<iostream,h> class A { public: A(){cout<<"1";} ~A(){cout<<"2";} }; Class B:public A { public: B(){cout<<"3";} ~B(){cout<<"4";} }; void main() { B b; }A.
[单选题]下面程序的结果是includeclass A{int a;public:A( ) :a(1) {}void showa ( ) {cout下面程序的结果是 #include<iostream.h> class A { int a; public: A( ) :a(1) {} void showa ( ) {cout < < a;} }; class B { int a; public: B( ) :a(2) {} void showa( ) {cout < < a;} }; class C: p
[单选题]下面程序的结果是()。includeclass A{int a;public:A():a(1){}void showa(){cout<下面程序的结果是( )。 #include<iostream.h> class A { int a; public: A():a(1){} void showa(){cout<<a;} }; Class B { int a; public: B():a(2){} void showa(){cout<<a;} ); class C:public A,public B
[单选题]下面程序的结果是includeclass A { int a;public: A():a(1){} void showa(){cout<<下面程序的结果是 #include<iostream.h> class A { int a; public: A():a(1){} void showa(){cout<<a;} }; class B { int a; public: B():a(2){} void showa(){cout<<a;} }; class C:public A,public B {
[单选题]下面程序的结果是includeclass A{int a;public:A( ):a(1){}void showa( ){cout<下面程序的结果是 #include<iostream.h> class A { int a; public: A( ):a(1){} void showa( ){cout<<a;} }; class B { int a; public: B( ) :a(2) {}A.1B.2C.3D.程序有错误