当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

有如下程序: #include<iostream> using namespace std; class AA { int n;


有如下程序: #include<iostream> using namespace std; class AA { int n; public: AA(int k);n(k){} intget(){return n;} int get()const{return n+1;} }; int main() { AA a(5); const AA b(6); cout<<a.get()<<b.get(); return 0; } 执行后的输出结果是

A.55

B.57

C.75

D.77

参考答案
您可能感兴趣的试题
  • 有如下程序:include<iostream>using namespace std;Class A{public:A(){cout<<“A”;}~A(){cout<<

  • 有如下程序: #include<iostream> void fun(int&x,int y){int t=x;x=y;y=t;} int ma

  • 有如下程序: #include<iostream> using namespace std; class Test { public

  • 有如下程序: #include<iostream> using namespace std; class A { public:

  • 有如下程序: #include<iostream> using namespace std; class BASE { public

  • 有如下程序: #inClude<iostream> using namespaCe std; Class A{ publiC: statiC int a;