Q.

Which of the following blocks will be executed whether an exception is thrown or not?

A. except
B. else
C. finally
D. assert
Answer» C. finally
Explanation: the statements in the finally block will always be executed, whether an exception is thrown or not. this clause is used to close the resources used in a code.
764
0
Do you find this helpful?
3

Discussion

No comments yet