如下程序执行后的输出结果是 【14】 。
#include <iostream>
using namespace std;
class Base
public:
Base(int x,int y)
a=x;
b=y;
void Show( )
cout<<"Base: "<<a<< ’,’ <<b<<" ";
private:
int a,b;
;
class Derived : public Base
public:
Derived(int x, int y, int z) : Base(x,y),c(z)
void Show( )
cout<<"Derived:"<<c<<end1;
private:
int c;
;
int main( )
Base b(100,100),*pb;
Derived d(10,20,30);
pb=&b;
pb->Show( );
pb=&d;
pb->Show( );
return 0;
题库:计算机等级考试
类型:填空题
时间:2017-07-03 15:23:30
免费下载:《填空》Word试卷
如下程序执行后的输出结果是 【14】 。
#include <iostream>
using namespace std;
class Base
public:
Base(int x,int y)
a=x;
b=y;
void Show( )
cout<<"Base: "<<a<< ’,’ <<b<<" ";
private:
int a,b;
;
class Derived : public Base
public:
Derived(int x, int y, int z) : Base(x,y),c(z)
void Show( )
cout<<"Derived:"<<c<<end1;
private:
int c;
;
int main( )
Base b(100,100),*pb;
Derived d(10,20,30);
pb=&b;
pb->Show( );
pb=&d;
pb->Show( );
return 0;
本题关键词:输出结果,行为结果,行为结果评价,竣工结算程序,行政诉讼程序,结果,肝糖输出,输出浓度,执行过程组,输卵管结扎术后并发症;