有如下程序:        #include<iostream>        using namespace std;        class Base        {        pubfic:        Base(){cout<<"BB";

admin2017-10-17  31

问题 有如下程序:        #include<iostream>        using namespace std;        class Base        {        pubfic:        Base(){cout<<"BB";f();}        void f(){cout<<"Bf":}        };        class Derived:public Base        {        public:        Derived(){cout<<"DD";)        voidf(){cout<<"Df":}        };        intmain(){Derived d;retum 0;}    执行上面的程序将输出

选项 A、BBBfDD
B、BBDfDDDf
C、DD
D、DDBBBf

答案A

解析
转载请注明原文地址:https://jikaoti.com/ti/znt0FFFM
0

随机试题
最新回复(0)