English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

C Language Basic Tutorial

C Language Flow Control

C Language Functions

C Language Arrays

C Language Pointers

C Language Strings

C Language Structure

C Language File

C Others

C Language Reference Manual

C Standard Library <assert.h>

C Standard Library assert.hThe header file provides a named assert It can be used to verify the assumptions made by the program and output diagnostic messages when the assumptions are false.

already defined macro assert points to another macro NDEBUG, the macro NDEBUG is not part of <assert.h>. If NDEBUG is defined as a macro name in the source file that references <assert.h>, then assert The definition of macro is as follows:

#define assert(ignore) ((void)0)

Library Macros

The following lists the unique functions defined in the header file assert.h:

Serial NumberFunction & Description
1void assert(int expression)
 Assertion functions, used to catch program errors during debugging