单选题 C++
题号 #2250914

有如下程序:
#include<iostream>
usingnamespacestd;
classA{
public:
A(inti=O):rl(i){}
voidprint(  ){cout<<'E'<<r1<<'-';)
voidprint(  )const{cout<<'C'<<r1*r1<<'
-';)
voidprint(intx){cout<<'P'<<r1*r1*r1<<'
-';}
private:
intr1;
};
intmain(  ){
Aal:
constAa2(4);
a1.print(2);
a2.print(  );
return0;
}
运行时的输出结果是(  )。

进入在线模考

参考答案

D

答案解析

D。【解析】略。

你可能感兴趣的试题

找试题 · 找答案 · 找资料 在线模考