हिंदी

While executing the program, if an exception is encountered in try block then execution of the code inside the try block is stopped and: -

Advertisements
Advertisements

प्रश्न

While executing the program, if an exception is encountered in try block then execution of the code inside the try block is stopped and:

विकल्प

  • Code of except block is executed and control is moved to the beginning of try block.

  • Control goes to except block and program stops.

  • Control goes to except block and lines after try ... except are executed.

  • Except bock is ignored.

MCQ

उत्तर

Control goes to except block and lines after try ... except are executed.

Explanation:

If an exception occurs while running the programme, execution of the code within the try block is halted, and control is passed to the except block, where the lines after try... except are executed.

shaalaa.com
Handling Exceptions
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×