单选

有如下程序:#include using namespace std;class Base{public:virtual void Show( ){cout<<'B';}};class Derived:public Base{public:void Show( ){cout<<'D';}};int main( ){Base *p1=new Derived;Derived *p2=new Derived;p1->Show( );p2->Show( );delete p1;delete p2;return 0;}运行这个程序的输出结果是__________

  • A.BB
  • B.BD
  • C.DB
  • D.DD
参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服