单项选择题
下面程序的运行结果为( )。 #include <iostream> using namespace std; class A{ public: A(){cout<<" ";} ~A(){cout<<" ";} } class B:public A{ public: B(){cout<<" ";} ~B(){cout<<" ";} } void main(){ B b; }
A.1234
B.1324
C.1342
D.3142
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
下面程序的运行结果为( )。 #include<iostream> using namespace std; void swap(int &a,int &b){ int temp; temp=a; a=b; b=temp; } void main(){ int a=2,b=3; swap(a,b); cout<<a<< , <<b<<ENDL; }
A.2,3
B.3,2
C.2,2
D.3,3
点击查看答案&解析
单项选择题
下面函数的运行结果是( )。 #include <iostream> using namespace std; class A{ public: A(){} int Min(int a,int b){return a<b a:b;} int Min(int a,int b,int c){ if(a<b)return a<c a:c; else return b<c b:c; } ~A(){} }; void main(){ A a; cout<<a.Min(1,2,3)<<a.Min(2,0); }
A.10
B.12
C.30
D.32
点击查看答案&解析
相关试题
下列描述中错误的是( )。
带有虚基类的多层派生类构造函数的成员初始...
read函数的功能是从输人流中读取( )。
当数据库被破坏时,若要有效地恢复数据库,...
栈是线性表的一种,其新加、读取和删除结点...