Question: Question 1 Function ? b a r ( ) , is a function that may throw an exception of type int. Mark all true
Question
Function is a function that may throw an exception of type "int". Mark all true statements below:
The function should be declared with the keyword "noexcept".
If the call statement to the function is not put in a try block, the program may be completed successfully without crashing
The function will always throw an exception when it is called.
A call statement to the function should be put in a "try" block.
If the caller of the function does not handle the exception thrown by this function, it will be immediately terminated.
The following "catch" block catches the exception thrown by the function :
catch runtimeerror
An exception that is thrown by the function can be caught by the following "catch" block: catch
The following "catch" block can be used to catch the exception thrown by the function :
catch char
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
