Vidyalelo
C++ Programming · Q340

C++ miscellaneous

Programming · C++ Programming · question 340

Q340

What will be the output of the following C++ code? #include using namespace std; int main() try try throw 20; catch (int n) cout << "Inner Catch "; throw; catch (int x) cout << "Outer Catch "; return 0;

A.
Inner Catch
B.
Outer Catch
C.
Inner Catch
Outer Catch
Answer
D.
Error

Answer: Option C

Solution

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