单项选择题
有如下程序:
#include <iostream>
using namespace std;
class Baseprivate:
char c;
public:
Base(char n):c(n)
~Base()
cout<<c;
;
class Derived: public Baseprivate:
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
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
在整型指针变量ptr1、ptr12的定义中,错误的是 ______。
A) int x, *ptr1, ptr2;
B) int*ptrl, x, *ptr2;
C) int x,*ptrl=&x,*ptr2;
D) int*ptr1, x,*ptr2=&x;
点击查看答案
单项选择题
数据库DB、数据库系统DBS、数据库管理系统DBMS之间的关系是
A) DB包含DBS和DBMS
B) DBMS包含DB和DBS
C) DBS包含DB和DBMS
D) 没有任何关系
点击查看答案&解析
相关试题
C++模板包括( )。