Evaluates an expression and prints an error message when the result is FALSE.
void assert (int expression);
Required Header |
<assert.h> |
Return Value
None.
Parameters
expression
An expression to be evaluated
Remarks
assert evaluates expression and prints "Assertion failed in __FILE__:__LINE__." when the result is FALSE.
assert is defined as a macro, and may be turned off without modifying the source code by defining the precompiler definition NDEBUG.