单项选择题
有如下程序:
#include <iostream>
using namespace std;
class AA
int n;
public:
AA(int k):n(k)
int get()return n;
int get()constreturn n+1;
int main()
AA a(5);
const AA b(6);
cout<<
A.get()<<
B.get();
return 0;
执行后的输出结果是( )。A. 55B. 57C. 75D. 77
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
设有以下说明和定义: #include<iostream. h> Void main() typedef union long i; int k[5]; char c; DATE; struct date int cat; DATE cow; double dog; too; DATE max; cout<<(sizeof(struct date)+sizeof(max))<<end1;
A.26
B.52
C.18
D.8
点击查看答案
单项选择题
一个类的友元函数或友元类能够通过成员操作符访问该类的( )。
A.私有成员
B.保护成员
C.公有成员
D.公用成员、保护成员和私有成员
点击查看答案
相关试题
有如下程序: #include <iostream> ...
下面程序的运行结果为( )。 #include...
有如下程序 #include <iostream> #i...