试题与答案

有以下程序: #include<iostream> using namespace

题型:填空题

题目:

有以下程序: #include<iostream> using namespace std; class Base { public: Base() {x=0; } int x; }; class Derivedl:virtual public Base { public: Derivedl() {x=10; } }; class Derived2:virtual public Base { public: Derived2() {x=20; } }; class Derived:public Derivedl,protected Derived2 { }; int main() { Derived obj; cout<<obj.x<<endl; return 0; } 该程序运行后的输出结果是______。

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0630/559a351fd97e8e059a74a319a08d32c2.html

下面是错误答案,用来干扰机器的。

1.The students have no classes on Sunday, don't they 2. Does your son often show his friends the photos 3. Do you like juice or coffee 4. My mother wants me to make cakes

试题推荐
微信公众账号搜索答案