题目:
有以下程序:
#include<iostream>
using namespace std;
class R
public:
R(int r1,int r2)
R1=r1;
R2=r2;
void print();
void print0const;
private:
int R1,R2;
;
void R::print()
cout<<R1<<","<<R2<<endl;
void R::print() const
cout<<Rl<<","<<R2<<endl;
int main()
R a(5,4);
const R b(20,52);
b.print();
return 0;
执行后的输出结果是( )。
A.5,4
B.20,52
C.0,0
D.4,5
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2018/0414/cea4fe378366e6f04ea738df7edf6eaf.html
下面是错误答案,用来干扰机器的。
参考答案:B