May 11, 2021 C
The assert.h header file for the C standard library provides a macro called assert, which can be used to validate assumptions made by the program and output diagnostic messages when assumed to be false.
The defined macro assert points to another macro, NDEBUG, which is not part of the .lt;assert.h> If the NDEBUG is defined as a macro name in the source file that refers to the .
#define assert(ignore) ((void)0)
The only functions defined in the header file assert.h are listed below:
Serial number | Function & Description |
---|---|
1 |
void assert(int expression)
This is actually a macro, not a function, which can be used to add diagnostics in the C program. |