Which keyword is used to catch exceptions in C++?
- handle
- rescue
- catch
- secure
In C++, the catch keyword is used to define a block of statements that will be executed when a particular exception is thrown. This block is used to handle the exception and provide a response, ensuring that the program can continue or terminate gracefully.
Loading...
Related Quiz
- In situations where the argument should not be modified, passing by _______ is preferable to ensure the original data remains unaltered.
- How can a function indicate that it will not throw any exceptions?
- The _______ header file in C++ provides a set of functions to manipulate C strings and arrays.
- The function _______ is used to close a file.
- Which of the following is a correct file extension for a C++ source file?