A _______ block is used to enclose the code that might throw an exception. 

  • loop 
  • function 
  • try 
  • class
In C++, the try block is used to wrap the code that might throw an exception. If any part of the code inside the try block throws an exception, the execution immediately shifts to the corresponding catch block to handle the exception, if a matching catch exists.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *