Q967
What will be the output of the following C++ code? #include using namespace std; void test(int x) try if (x > 0) throw x; else throw 'x'; catch(int x) cout<<"integer:"<<x; catch(char x) cout << "character:" << x; int main() test(10); test(0);
A.
integer:10character:x
AnswerB.
integer:10
C.
character:x
D.
character:10
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board