[主观题]

以下程序执行后输出的结果是()。 include include using namespace std; int

以下程序执行后输出的结果是[ ]。

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;

}

参考答案与解析:

相关试题

以下程序执行后输出的结果是()。 include include using n