Program -
#include<fstream.h>
#include<stdlib.h>
#include<conio.h>
const int size=10;
void main()
{
int pos=0;
ifstream
fin("raj.dot");
char ch;
fin.seekg(8);
while(fin.get(ch))
{
cout<<ch;
if(ch==""||ch=="#")
{
pos=fin.tellg();
cout<<"\n
position of"<<ch<<"is"<<pos;
continue;
}
}
getch();
}
Output -
position of (blank) is 9
management
position of (blanks) is 20
#
position of # is 21
systems
0 comments:
Post a Comment