Write the output of the First Print statements : f=open("data.txt",'w') f.write("Hello") f.write("Welcome to my Blog") f.close() f=open("data.txt",'r') d=f.read(5) print(d) # First Print Statement f.seek(10) d=f.read(3) print(d) # Second Print Statement f.seek(13) d=f.read(5) print(d) # Third Print Statement d=f.tell() print(d) # Fourth Print Statement

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
Write the output of the First Print statements :
f=open("data.txt",'w')
f.write("Hello")
f.write("Welcome to my Blog")
f.close()
f=open("data.txt",'r')
d=f.read(5)
print(d) # First Print Statement
f.seek(10)
d=f.read(3)
print(d) # Second Print Statement
f.seek(13)
d=f.read(5)
print(d) # Third Print Statement
d=f.tell()
print(d) # Fourth Print Statement

1.Hello

2.Hell

3.ello

4.None of the above


More MCQS Questions and answers

R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!