#include<iostream>
#include<fstream>
using namespace std;
int main()
{
int i=0,j=0,len=0;
char str[100];
ifstream rs("ok2002com.txt");
if(!rs)
cout<<"文件没有打开!"<<endl;
while(rs>>str[i])
{
len++;
i++;
}
cout<<"文件长度为:"<<len<<endl;
cout<<"文件倒读为:";
rs.close();
rs.open("ok2002com.txt",ios::ate);
while(j<len)
{
rs.seekg(0,ios::end);
rs.get(str[i--]);
cout<<str[i];
j++;
}
rs.close();
cout<<endl;
cin>>i;
}