CBSE Class 12 Computer Science Question 58 of 136

Data File Handling — Question 23

Back to all questions
23
Question

Question 23

What happens if no arguments are passed to the seek() method?

  1. file position is set to the start of file
  2. file position is set to the end of file
  3. file position remains unchanged
  4. results in an error
Answer

results in an error

Reason — If no arguments are passed to the seek() method in Python, it will result in an error because the method expects at least one argument to specify the new position within the file.