试题查看

【分析解答题】

运行程序,从键盘上输入“This is aC++prog!”后输出到一个文件中,并显示在屏幕上,显示结果:

This is aC++prog!。
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
void main()
char str[20];
ofstream outf("D、\tem.dat",ios::trunc);
cin>>str;
outf<<str;
outf.close();
int i=0;
while(str[i]!=’\0’)
cout<<str[i];
i++;
cout<<endl;
查看答案解析

参考答案:

正在加载...

答案解析

正在加载...

根据网考网移动考试中心的统计,该试题:

0%的考友选择了A选项

0%的考友选择了B选项

0%的考友选择了C选项

0%的考友选择了D选项

你可能感兴趣的试题

某企业2010年12月生产A产品2000件,实际消耗材料为1800千克,成本为3假设某企业有关产量、单位产品消耗量和单价如下表所示:项目计量单位计划指标实际指标期间费用分析就是对费用计划完成情况的分析。#include<iostream.h>classApublic:A(inti=#include<iostream.h>classAinta,b;constin#include<iostream.h>classAprivate:intx;p