单项选择题

有如下程序:
#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;
}
程序执行后的输出结果是 ____

A.100
B.000
C.010
D.001
题目列表

你可能感兴趣的试题

微信扫码免费搜题