Q997
What will be the output of the following C++ code? #include using namespace std; int main() int x = -1; try if (x < 0) throw x; else cout<<x; catch (int x ) cout << "Exception occurred: Thrown value is " << x << endl; return 0;
A.
-1
B.
0
C.
Exception occurred: Thrown value is -1
AnswerD.
Error
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board