单项选择题

下面程序的运行结果为( )。
#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
<上一题 目录 下一题>
热门 试题

单项选择题
假设有函数模板定义如下,下列各选项中正确的是( )。 Template <class T> T Max(T a,T b,T c) if(a<b) if(b<c) return c; else return b; else if(a<c) return c; else return a;
A.float x,y,z;float max;max=Max(x,y,z);
B.float x;int y,z;float max;max=Max(x,y,z);
C.float x;double y,z;float max;max=Max(x,y,z);
D.三个选项都正确
单项选择题
下面程序的运行结果为( )。 #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
相关试题
  • 若类B是类A的私有派生类,类C是类B的公有派...
  • 下面程序的运行结果为 【10】 。 clas...
  • 多继承情况下,派生类对基类成员的访问会出...
  • 函数不能直接引用类中说明的非静态成员,这...
  • 一个类中有 【9】 个析构函数。