Explore topic-wise MCQs in C++ Programming.

This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your C++ Programming knowledge and support exam preparation. Choose a topic below to get started.

1.

What is Re-throwing an exception means in C++?

A. An exception that is thrown again as it is not handled by that catching block
B. An exception that is caught twice
C. An exception that is not handled in one caught hence thrown again
D. All of the mentioned
Answer» E.
2.

Which keyword is used to throw an exception?

A. try
B. throw
C. throws
D. except
Answer» C. throws
3.

What are the different types of exceptions?

A. 1
B. 2
C. 3
D. 4
Answer» C. 3
4.

What is the difference between error and exception?

A. Both are the same
B. Errors can be handled at the run-time but the exceptions cannot
C. Exceptions can be handled at the run-time but the errors cannot
D. Both can be handled during run-time
Answer» D. Both can be handled during run-time
5.

What is an error in C++?

A. Violation of syntactic and semantic rules of a languages
B. Missing of Semicolon
C. Missing of double quotes
D. Violation of program interface
Answer» B. Missing of Semicolon
6.

Which of the following is an exception in C++?

A. Divide by zero
B. Semicolon not written
C. Variable not declared
D. An expression is wrongly written
Answer» B. Semicolon not written
7.

Which part of the try-catch block is always fully executed?

A. try part
B. catch part
C. finally part
D. throw part
Answer» D. throw part
8.

How Exception handling is implemented in the C++ program?

A. Using Exception keyword
B. Using try-catch block
C. Using Exception block
D. Using Error handling schedules
Answer» C. Using Exception block
9.

By default, what a program does when it detects an exception?

A. Continue running
B. Results in the termination of the program
C. Calls other functions of the program
D. Removes the exception and tells the programmer about an exception
Answer» C. Calls other functions of the program
10.

What is an exception in C++ program?

A. A problem that arises during the execution of a program
B. A problem that arises during compilation
C. Also known as the syntax error
D. Also known as semantic error
Answer» B. A problem that arises during compilation