单项选择题
有以下程序 #include<iostream> using namespace std; class Base { private: char c; public: Base(char n):c(n){} ~Base() { cout<<c; } }; class Derived:public Base { private: char c; public: Derived(char n):Base(n+1),c(n){} ~Derived() { cout<<c; } }; int main() { Derived obj(’x’); return 0; } 执行后的输出结果是
A.xy
B.yx
C.x
D.y
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
在最坏情况下,下列排序方法中时间复杂度最小的是
A.冒泡排序
B.快速排序
C.插入排序
D.堆排序
点击查看答案&解析
单项选择题
下列叙述中正确的是
A.软件就是程序清单
B.软件就是存放在计算机中的文件
C.软件应包括程序清单以及运行结果
D.软件包括程序、数据和文档
点击查看答案&解析
相关试题
有如下程序: #include<iostream> usi...
有如下程序 #include<iostream> using...
有以下程序 #include<iostream> using...
有如下程序: #include<iostream> usi...
若有以下程序: #include<iostream> u...