有如下程序,程序的输出结果是。#include<i

有如下程序,程序的输出结果是()。

#include<iostream>
using namespace std;
class Base{
public:
    Base(int x=0){cout<<x;}
};
class Derived:public Base{
public:
    Derived(int x=0){cout<<x;}
private:
    Base val;
};
int main(){
    Derived d(1);
    return 0;
}
答案
D

题目信息

题号:6067
题型:单选题
难度:普通