NIELIT O Level Exam

<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())

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.

seek(0) file pointer को शुरुआत में ले जाता है, इसलिए tell() 0 return करता है।
Latest Current Affairs 2026 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad