You copied the Doc URL to your clipboard.

Boolean type and <stdbool.h> in C99

C99 introduces the native type _Bool.

The associated standard header <stdbool.h> introduces the macros bool, true and false for Boolean tests. For example:

#include <stdbool.h>
bool foo(FILE *str)
{
    bool err = false;
    ...
    if (!fflush(str))
    {
        err = true;
    }
    ...
    return err;
}
Note

The C99 semantics for bool are intended to match those of C++.

Was this page helpful? Yes No