Q1medium
A program is stuck in a while loop reading from a network socket because no data is arriving. This state is known as:
Topic-wise practice questions for Programming (C++ / Java / Python). Test your knowledge, check solutions on demand, and pace your preparation.
print("Apple", end="-")
print("Orange")
file = open("data.txt", "w")
file.write("Hello")
# System crashes here
file.close()
What is a likely real-world risk if the close() method is never reached?