填空题

在面向对象方法中,类之间共享属性和操作的机制称为 【2】 。

【参考答案】

继承
<上一题 目录 下一题>
热门 试题

填空题
在一个有n个元素的顺序表的第i个元素(1≤i≤n)之前插入一个新元素时,需要向后移动 【1】 个元素
单项选择题
若有以下程序: #include <iostream> using namespace std; class Base private: int a,b; public: Base(int x, int y) a=x; b=y; void show() cout<<a<< , <<b<<end1; ; class Derive : public Base private: int c, d; public: Derive(int x,int y, int z,int m):Base(x,y) c=z; d=m; void show() cout<<c<< , <<d<<end1; ; int main () Base b(50,50),*pb; Derive d(10,20,30, 40); pb=&d; pb->show (); return 0; 招待程序后的输出结果是( )。
A.10,20
B.30,40
C.20,30
D.50,50
相关试题
  • 有以下程序: #include <iostream> ...
  • 若有以下程序: #include <iostream>...
  • 对虚函数的调用有两种方式: 【11】 和...
  • 【13】 使一个函数可以定义成对许多不同...
  • 假定用户没有给一个名为MyClass的类定义析...