单项选择题

有如下程序:
#include <iostream>
using namespace std;
class Base
{
private:
char c;
public:
Base(char n) :c(n){}
~Base()
{
cout<<c;
} };
class Derived: public Base
{
private:
char c; public:
Derived(char n):Base(n+1),c(n) {}
~Derived()
{
cout<<c;
}
};
int main ()
{
Derived obj ("x");
return 0;
}
执行上面的程序净输出

A.xy
B.yx
C..x
D..y
题目列表

你可能感兴趣的试题

微信扫码免费搜题