填空题
在声明派生类时,如果不显式地给出继承方式,缺省的类继承方式是私有继承private。 已知有如下类定义: class Base{ protected: void fun(){} public: Foo():value(0){} } ; class Derived:Base{}; 则Base类中的成员函数fun(),在Derived类中的访问权限是【 】 (注意:要求填写private、protected或public中的一项)。
【参考答案】
private
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
以下程序运行后的输出结果是_________。main(){ char c; int n=100; float f=10; double x; x=f*=n =(c=50); printf( %d %f n ,n,x); }
点击查看答案&解析
填空题
有以下程序:int sub(int n) { return(n 10+n%10); }main(){ int x,y; scanf( %d ,&x); y=sub(sub(sub(x))); printf( %d n ,y);}若运行时输入 1234,程序的输出结果是_________。
点击查看答案&解析
相关试题
C++语句const char * const p= he...
以下程序输出的结果是【 】。#include<i...
以下程序的输出结果是【 】。#include<i...
C++语言中的多态性是在编译时通过【 】...
对于下面定义的类MyClass,请在函数f( )...