in reply to Re^2: Initialsing file pointer in the middle of a file.
in thread Initialsing file pointer in the middle of a file.

Actually I'm of the impression that seek function may eat up a lot of time if I'm suppose to execute it in a loop.
What makes you think that?
I need to traverse a file and I may require constant vertical movement. But then performance is an issue here.
Are you sure a file is actually your best option? Perhaps you are better off storing your data in a database. (But then, since your post doesn't say anything about the problem you are working on, it's just a pure guess).
I'm willing to initialise file pointers at the place where it is required. Is there a way to do that. Thanks for your reply.
A file pointer is just some structure holding some information. One field of that structure is the "offset". Reading or writing updates the offset. So does a seek.
  • Comment on Re^3: Initialsing file pointer in the middle of a file.