单选题 C++
题号 #4126085

有如下程序:
    #include<iostream>
    using namespace std;
    class BASE
    {
        char c;
    public;
        BASE(char n):c(n){}
        virtual ~ BASE(){cout<<c;}
    };
    class DERIVED: public BASE{
        char c;
    public;
        DERIVED(char n):BASE(n+1),c(n){}
        ~DERIVED(){cout<<c;}
    };
    int main()
    {
        DERIVED('X');
        return 0;
    }
执行上面的程序将输出________。

进入在线模考

参考答案

A

答案解析

略。

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考