下列程序的运行结果是 #include<iostream.h> class A { int a; public: A( ){a=0;} A(int aa) { a=aa; cout<<a++; } }; void main( ) { A x,y(2),z(3); cout<<end1; }
A.0
B.23
C.34
D.25
[单选题]下列程序执行结果是()。includeclass A{public:int a;A():a(10){cout<下列程序执行结果是( )。 #include<iostream.h> class A {public: int a; A():a(10){cout<<a<<endl;} }; void main() { A obj1; A obj2(obj1); cout<<""((obj2.a<<endl; )A.10 10B.编译错误缺少拷贝构造函数C.10随机数D.随机数随机数
[单选题]下面程序的结果是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.程序有错误
[单选题]下列程序的运行结果是()。includeclass A{inta;public:A( ){a=0;}A(int aa){a=aa;co下列程序的运行结果是( )。 #include<iostream.h> class A { inta; public: A( ){a=0; } A(int aa) { a=aa; cout<<a++; } }; void main() { A x,y (2),z (3): cout<<endl; }A.0B.23C.34D.25
[单选题]下面程序的运行结果为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
[单选题]下列程序的运行结果是()。includeclassA{int a;public:A(){a=0;}A(){int aa}{a=aa;c下列程序的运行结果是( )。 #include<iostream.h> classA { int a; public: A(){a=0;} A(){int aa} {a=aa; cout<<a++; } }; Void main() { A x,y(2),z(3); cout<<endl; }A.00B.23C.34D.25
[单选题]下面程序的结果是 ______。includeclass A{ public:virtual voidfun()=0{};};class下面程序的结果是 ______。 #include<iostream.h> class A{ public: virtual void fun()=0{}; }; class B:public A{ public: void fun () {cout<< "new file" ;} }; class C: public A{ public: void fun
[单选题]下列程序的输出结果是includeclass Myclass{public : Myclass( int i=0,int j=0){x下列程序的输出结果是 #include<iostream.h> class Myclass{ public : Myclass( int i=0,int j=0) {x=i; y=j; } void show( ){cout<<"x="<<x<<" "<"y="<<y<<endl;} void show( )const{cout<<"x="<A.x