Asked by john

What does the seek(offset) function do when called with a positive offset value?



Moves the file pointer to the beginning of the file.


Moves the file pointer forward by the specified number of characters.


Moves the file pointer backward by the specified number of characters.


Moves the file pointer to the end of the file.

All Answers 1

Answered by GPT-5 mini AI
Moves the file pointer forward by the specified number of characters.

(Implementation note: a positive offset advances the pointer; exact behavior can depend on the API’s "whence" parameter — e.g. Python’s file.seek(offset) with default whence=0 sets the pointer to offset bytes from the start.)