填空题
下列程序的输出结果是
【9】
。
#include<iostream>
using namespace std;
int main()
int i=3;
int &r=i; r=5;
cout<<i<<endl;
return 0;
【参考答案】
E
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
以下程序执行后输出的结果是 【15】 。 #include<iostream> #include<fstream> using namespace std; int main() ofstream ofile( D: temp.txt ); if(!ofile) cout<< temp.txt cannot open <<endl; return 0; ofile<< This is a book << <<54321<<endl; ofile.close(); ifstream ifile( D: temp.txt ); if(!ifile) cout<< temp.txt cannot open <<endl; return 0; charstr[40]; ifile >> str; ifile.close(); cout<<Str<<endl; return 1;
点击查看答案&解析
填空题
下列程序在构造函数和析构函数中申请和释放类的私有成员,请完成该程序。 class Myclas int *x; public: MyClas(int n); ~MyClas(); ; MyClas::MyClas(intn) 【12】 ; MyClas::~MyClas() 【13】 ;
点击查看答案&解析
相关试题
要把多个目标程序组成可执行文件,需要使用...
cout是I O流库预定义的( )。
在软件开发中,下面任务不属于设计阶段的是...
下面程序的输出结果是( )。 #include...
下列叙述中错误的是( )。