The C Standard Library
C Standard Library Resources
C Programming Resources
Selected Reading
- C Library - <time.h>
- C Library - <string.h>
- C Library - <stdlib.h>
- C Library - <stdio.h>
- C Library - <stddef.h>
- C Library - <stdarg.h>
- C Library - <signal.h>
- C Library - <setjmp.h>
- C Library - <math.h>
- C Library - <locale.h>
- C Library - <limits.h>
- C Library - <float.h>
- C Library - <errno.h>
- C Library - <ctype.h>
- C Library - <assert.h>
- C Library - Home
C Standard Library Resources
C Programming Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
C Library - <assert.h>
C Library - <assert.h>
The assert.h header file of the C Standard Library provides a macro called assert which can be used to verify assumptions made by the program and print a diagnostic message if this assumption is false.
The defined macro assert refers to another macro NDEBUG which is not a part of <assert.h>. If NDEBUG is defined as a macro name in the source file, at the point where <assert.h> is included, the assert macro is defined as follows −
#define assert(ignore) ((void)0)
Library Macros
Following is the only function defined in the header assert.h −
Sr.No. | Function & Description |
---|---|
1 |
This is actually a macro and not a function, which can be used to add diagnostics in your C program. |