Q966
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 (int var ) cout<<"Exception Caught "; cout<<"After catch "; return 0;
A.
Inside try
Exception Caught
After catch
AnswerException Caught
After catch
B.
Inside try
After throw
After catch
After throw
After catch
C.
Inside try
Exception Caught
After throw
Exception Caught
After throw
D.
Inside try
Exception Caught
After throw
After catch
Exception Caught
After throw
After catch
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board