works fine without the for loop.... if i use for loop...it doesnt give the output... where am i going wrong?
Code:#include<iostream> #include<conio.h> #include<fstream> using namespace std; main() { char c; int i; ifstream in; in.open("efg.txt"); int p=in.tellg(); for(i=1;i<p;i++) { in.seekg(-i,ios::end); in>>c; cout<<c; } in.close(); getch(); return 0; }