CBSE Class 12 Computer Science Question 62 of 145

File Handling — Question 23

Back to all questions
23
Question

Question 23

Which of the following option is the correct usage for the tell() of a file object ?

  1. It places the file pointer at a desired offset in a file.
  2. It returns the entire content of a file.
  3. It returns the byte position of the file pointer as an integer.
  4. It tells the details about the file.
Answer

It returns the byte position of the file pointer as an integer.

Reason — The tell() function returns the current byte position of file pointer in the file as an integer.