CBSE Class 12 Computer Science Question 64 of 145

File Handling — Question 25

Back to all questions
25
Question

Question 25

What is the significance of the seek() method ?

  1. It seeks the absolute path of the file.
  2. It tells the current byte position of the file pointer within the file.
  3. It places the file pointer at a desired offset within the file.
  4. It seeks the entire content of the file.
Answer

It places the file pointer at a desired offset within the file.

Reason — The seek() function changes the position of the file-pointer by placing the file-pointer at the specified position in the open file.