填空题
有以下程序:
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
fstream file;
file.open("abc.txt", ios_base::in);
if (! file )
{
cout<<"Can not open abc.txt"<<end1;
abort();
}
char ch;
int i = 0;
while ( ! file.eof() )
{
file.get(ch);
i++;
}
cout<<"Characters : "<<i<<end1;
file.close();
return 0;
}
程序实现的功能是 【15】 。
【参考答案】
统计文件abc.txt中的字符个数