assert macro — Checks an assertion at runtime
void assert(int expression)
If enabled, the assert
macro ensures the expression
is
true (nonzero). If so, nothing happens, and execution continues
normally. If the expression evaluates to 0
, assert
prints a message to the standard
error file and calls abort
. The
format of the message is implementation-defined, but it includes a
textual representation of expression
and the filename and line
number where the assert
call
appears (that is, the values of the _
_FILE_ _
and _ _LINE_ _
macros).
If disabled, the assert
macro does not evaluate expression
and has no effect.