CPP Exception Handling Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 8865 | Total Attempts: 106,055
| Questions: 19 | Updated: Aug 15, 2026
Please wait...
Question 1 / 20
🏆 Rank #--
0 %
0/100
Score 0/100

1. What is thrown when attempting to dereference a null pointer in a checked context?

Submit
Please wait...
About This Quiz
CPP Exception Handling Quiz - Quiz

This quiz tests your understanding of exception handling in C++, a critical skill for writing robust and maintainable code. You'll explore try-catch blocks, exception types, custom exceptions, and best practices for error management. Master these concepts to build applications that gracefully handle runtime errors and unexpected conditions.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. True or False: Exceptions should be caught by const reference to avoid slicing.

Submit

3. What happens if no catch block matches a thrown exception?

Submit

4. True or False: The stack is unwound when an exception is thrown.

Submit

5. A function declared with 'throw()' specification means it____ any exceptions.

Submit

6. Which exception is thrown for invalid type casts using dynamic_cast?

Submit

7. What is the primary purpose of the noexcept keyword in C++11 and later?

Submit

8. True or False: An exception thrown inside a catch block cannot be caught by an outer try-catch.

Submit

9. In exception handling, the order of catch blocks matters; more____ exceptions should be caught first.

Submit

10. Which exception is thrown when dynamic memory allocation fails?

Submit

11. What keyword is used to throw an exception in C++?

Submit

12. True or False: You can create custom exception classes by inheriting from std::exception.

Submit

13. A catch-all handler uses the ellipsis operator____.

Submit

14. Which exception is thrown when accessing an out-of-range vector element?

Submit

15. What does the 'what()' function do in exception handling?

Submit

16. True or False: Multiple catch blocks can follow a single try block.

Submit

17. In C++, a catch block can catch exceptions by____.

Submit

18. What is the base class for all standard exceptions in C++?

Submit

19. Which of the following is the correct syntax for a try-catch block?

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (19)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
What is thrown when attempting to dereference a null pointer in a...
True or False: Exceptions should be caught by const reference to avoid...
What happens if no catch block matches a thrown exception?
True or False: The stack is unwound when an exception is thrown.
A function declared with 'throw()' specification means it____ any...
Which exception is thrown for invalid type casts using dynamic_cast?
What is the primary purpose of the noexcept keyword in C++11 and...
True or False: An exception thrown inside a catch block cannot be...
In exception handling, the order of catch blocks matters; more____...
Which exception is thrown when dynamic memory allocation fails?
What keyword is used to throw an exception in C++?
True or False: You can create custom exception classes by inheriting...
A catch-all handler uses the ellipsis operator____.
Which exception is thrown when accessing an out-of-range vector...
What does the 'what()' function do in exception handling?
True or False: Multiple catch blocks can follow a single try block.
In C++, a catch block can catch exceptions by____.
What is the base class for all standard exceptions in C++?
Which of the following is the correct syntax for a try-catch block?
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!