adplus-dvertising
frame-decoration

Question

What is the output of this program?
fo = open("foo.txt", "wb")
print "Name of the file: ", fo.name
fo.flush()
fo.close()

a.

Compilation Error

b.

Runtime Error

c.

No Output

d.

Flushes the file when closing them

Answer: (d).Flushes the file when closing them

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?