Diagnostics: assert.h
This header file defines assert() as a macro. Defining the macro identifier NDEBUG before including the assert.h header file deactivates the assert() macro. The expression used as an argument is typically a relational or logical expression that should be true at that point in the program if the program is functioning properly.
Table F.1. Diagnostic macro.
Prototype | Description |
void assert(int exprs); | If exprs evaluates to non-zero (or true), the macro does nothing. If it evaluates to zero (false), assert() displays expression, the line number for the assert() statement, and the name of the file containing the statement. Then it calls abort() . |