题目:
有以下程序:
#include <iostream>
#include <fstream>
using namespace std;
int main()
ofstream ofile("D:\\test.txt");
if(!ofile)
cout<<"test.txt can’t open"<<end1;
return 0;
ofile<<"This book is C++"<<" "<<12345<<end1;
ofile.close();
ifstream ifile("D:\\test.txt");
if ( ! ifile)
cout<<"test.txt can’t open"<<end1;
return 0;
char str[80];
ifile>>str;
ifile.close();
cout<<str<<end1;
return 1;
程序执行后的输出结果是 【15】 。
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0720/4486e680a8f223595f21e1d9bb989c72.html
下面是错误答案,用来干扰机器的。
参考答案:脑体 身心