--:--









Quiz for try, catch, and throw keywords

Course: C++ Language | Subject: Unit 10 | Topic: Exception Handling



Logo

Q1: Which keyword is used to define a block of code to test for exceptions?

Logo

Q2: Which keyword is used to handle exceptions?

Logo

Q3: Which keyword is used to raise an exception?

Logo

Q4: Can multiple catch blocks follow a single try block?

Logo

Q5: What happens if no catch block matches the thrown exception?

Logo

Q6: Which of the following can be used to catch all exceptions?

Logo

Q7: Can try blocks be nested inside other try blocks?

Logo

Q8: Is it possible to rethrow an exception from inside a catch block?

Logo

Q9: What type of entities can be thrown as exceptions?

Logo

Q10: Which block executes regardless of whether an exception is thrown or not?

Logo

Q11: What is the purpose of a throw statement?

Logo

Q12: How can exceptions be caught by reference?

Logo

Q13: What is a common base class for standard exceptions?

Logo

Q14: Which statement best describes the try block?

Logo

Q15: Can a catch block catch exceptions of a base class type?

Logo

Q16: Is it valid to throw a pointer as an exception?

Logo

Q17: What is the difference between throw and rethrow?

Logo

Q18: Which block is executed if an exception is thrown but no matching catch block is found?

Are you ready to start test? Set your time limit