MCQ Answer

<p>What is the output of following?</p><pre><span style="font-size: 14px;">f = open("test.txt", "r")<br></span><span style="font-size: 14px;">f.seek(0)<br></span><span style="font-size: 14px;">print(f.tell())</span></pre>

What is the output of following?

f = open("test.txt", "r")
f.seek(0)
print(f.tell())


निम्न code का output क्या होगा?

f = open("test.txt", "r")
f.seek(0)
print(f.tell())
Topic : File Processing in Python

A. 0

B. 1

C. File size

D. Error




Correct Answer is :

A. 0



Explanation
seek(0) moves the file pointer to the beginning; tell() therefore returns 0. <br><br> seek(0) file pointer को शुरुआत में ले जाता है, इसलिए tell() 0 return करता है।
Online Exam Quiz for One day Exam Online Typing Test CCC Online Test 2026 Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Best Website and Software Company in Allahabad