Examveda

What is the function of the 'assert' macro in C++?

A. It throws an exception if a condition is false

B. It catches exceptions

C. It handles arithmetic errors

D. It ensures proper memory allocation

Answer: Option A


Join The Discussion

Related Questions on Exception Handling in C plus plus

What is exception handling in C++?

A. A method to handle errors during runtime

B. A method to handle errors during compile time

C. A method to handle errors during linking

D. A method to handle errors during execution