Vidyalelo
C++ Programming · Q132

C++ miscellaneous

Programming · C++ Programming · question 132

Q132

What will be the output of the following C++ code? #include using namespace std; int main() int var = -12; try cout<<"Inside try "; if (var < 0) throw var; cout<<"After throw "; catch (char var ) cout<<"Exception Caught "; cout<<"After catch "; return 0;

A.
Inside try
Exception Caught
After catch
B.
Inside try
After throw
After catch
C.
Error
D.
Run-time error
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board