问题
填空题
以下程序的执行结果是______。
#include<iostream.h>
#include<fstream.h>
#include<stdlib.h>
void main()
char ch;
fstream file;
file.open("abc. dar",ios::out|ios:: in|ios::binary):
if(! file)
cout<<"abc.dat文件不能打开"<<endl;
abort() ;
file<<"12 34 56"<<endl;
file.seekg(o,ios::beg):
while(!file.eof())
streampos here=file.tellg();
file.get(ch);
if(ch==’ ’)
cout<<here<<" ";
cout<<endl:
答案
参考答案:Y