【分析解答题】
运行程序,从键盘上输入“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选项