填空题
下列程序的输出结果是______。 #include<iostream> using namespace std; int main() { int data=l; int &r = data; data+=5; r+=5; cout<<data<<endl; return 0; }
【参考答案】
K
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
下列程序的输出结果是______。#include<iostream>using namespace std;class Test {public:Test() { cnt++;}~Test() {cnt--;}static int Count() {return cnt;}private:static int cnt;};int Test::cnt=0;int main(){cout<<Test::Count()<<’’;Test t1,t2;Test*oT3=new Test;Test*pT4=new Test;cout<<Test::Count()<<’’;delete pT4;delete pT3;cout<<Test::Count()<<endl;return 0;}
点击查看答案&解析
填空题
虚函数必须是类的______。
点击查看答案&解析
相关试题
有以下程序:#include<iostream>using ...
下面程序的执行结果是______。#incl...
Staff类含有血型数据成员ID,两个Staff对象...