填空题

面向对象程序设计支持的3大特性为:封装性、继承性和 【3】 。

【参考答案】

多态性
<上一题 目录 下一题>
热门 试题

单项选择题
有以下程序: #include <iostream> #include <string> using namespace std; int main ( ) { char b1[8] = abcdefg ; char b2[8],*pb=b1+3; while (--pb>=b1) strcpy (b2, Pb) ; cout<<strlen (b2) <<end1; return 0; } 程序运行后的输出结果是( )。
A.8
B.3
C.1
D.7
单项选择题
若有以下程序: #include <iostream> using namespace std; class point { private: int x, y; public: point ( ) { x=0; y=0; } void setpoint(int x1,int y1) { x=x1; y=y1; } void dispoint () { cout<< x= <<x<< , << y= <<y<<end1; } }; int main ( ) { point *p=new point; p->setpoint (5, 12); p->dispoint (); return 0; } 程序运行后的输出结果是( )。
A.x=12,y=12
B.x=5,y=5
C.x=12,y=5
D.x=5,y=12
相关试题
  • 下面程序的预设功能是:将文本文件readme ...
  • 有以下程序:#include <iostream.h>cl...
  • 下面程序的输出结果是 【8】 。#includ...
  • 有如下程序:#include <iostream>using...
  • 在C++中,打开一个文件,就是将这个文件...