单选题:有如下程序: #include<iostream>using namespace std; class Base{p

  • 题目分类:C++
  • 题目类型:单选题
  • 号外号外:注册会员即送体验阅读点!
题目内容:
有如下程序:
#include<iostream>
using namespace std;
class Base
{
public:
void funl(){cout<<”Base\n”;}
virtual void fun2(){eout<<”Base\n”;}
};
class Derived:public Base{
public:
void funl(){eout<<”Derived、n”;}
void fura(){eout<.<”Derived\n”;}
};
void f(Base&B.}b.funl();b.ftm2();}
int main()
{
Derived obj;
f(obj);
return 0;
}
执行这个程序的输出结果是(  )。 A.Base
Base
B.Base
Derived
C.Derived
Base
D.Derived
Derived

参考答案:
答案解析:

有如下类定义: class Point{int xx.yy; public: Point():xx(0),yy(0){

有如下类定义: class Point{int xx.yy; public: Point():xx(0),yy(0){}Point(int x,

查看答案

Questions ·Read the article below about Assets and Processe

Questions ·Read the article below about Assets and Processes. ·Choose the bes

查看答案

In this part of the test,you are asked to give a short talk

In this part of the test,you are asked to give a short talk on a business topi

查看答案

According to the writer, the liability associated with the

According to the writer, the liability associated with the service means thatA.

查看答案

According to the writer, the retailer engaged in service re

According to the writer, the retailer engaged in service retailingA.just sees t

查看答案