Which of the following is true about exception handling in C++?

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Which of the following is true about exception handling in C++?

Post by answerhappygod »

i) There is a standard exception class in C++ similar to Exception class in Java.
ii) All exceptions are unchecked in C++, i.e., the compiler does not checks if the exceptions are caught or not.
iii) In C++, a function can specify the list of exceptions that it can throw using comma separated list like following.
void fun(int a, char b) throw (Exception1, Exception2, ..)
a) i, iii
b) i, ii, iii
c) i, ii
d) ii, iii
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!

This topic has 1 reply

You must be a registered member and logged in to view the replies in this topic.


Register Login
 
Post Reply