26

单选题 26 /49

看以下代码:
class A 
{ 
    public: 
    ~A(); 
}; 
A::~A() 
{ 
    printf("delete A "); 
}
class B : public A 
{ 
    public: 
    ~B(); 
}; 
B::~B() 
{ 
    printf("delete B "); 
} 
请问执行以下代码
A *pa = new B(); 
delete pa; 
输出的串是()

参考答案

delete A
delete B
delete B delete A
delete A delete B
牛客网,程序员必备求职神器
QQ群:169195721
微 信:www_nowcoder_com 关注
微 博:牛客网 关注

扫一扫,把题目装进口袋