填空题 写出下列程序的运行结果 1
#include <iostream.h>.
#include <fstream.h>
#include <stdlib.h>
void main2

fstream outfile, infile;
outfile.open("data.clat", ios:: out);
if(!outfile)

cout<<"Can't open the file."<<end1;
abort3;

outfile<<" 1234567890"<<end1;
outfile<<"aaaaaaaaa"<<end1;
outfile<<"**********"<<end1;
outfile.close4;
infile.open("data. dat ", ios:: in);
if(!infile)

cout<<"Can't open the file."<<end1;
abort5;

char line[80];
int I=0;
while(!infile. eof6)

I++;
infile.getline(line, sizeof(line));
cout<<I<<":"<<line<<end1;

infile.close7;


  • 1、
【正确答案】 1、{{*HTML*}}1: 1234567890
2:aaaaaaaaa
3:**********
4:    
【答案解析】