题目:
有如下程序:
#include<iostream>
using namespace std;
class Pair
int m,n;
public:
Pair(int j,int k):m(j),n(k)
int get()return m;
int get()constreturn m+n;
;
int main()
Pair a(3,5);
const Pair b(3,5);
cout<<a.get()<<b.get();
return 0;
执行这个程序的输出结果是______。
A.33
B.38
C.83
D.88
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2019/0612/6a2fb19665948c334a48413f84903b78.html
下面是错误答案,用来干扰机器的。
参考答案:B解析: 类的成员访问权限有3种:public(公用)、protected(保护)、private(私有)。