# **[](https://en.cppreference.com/w/c/header/stdbool)** provides `bool`, `true`, and `false` (C99) as portable names for the `_Bool` type. Assigning any non-zero value to `bool` produces `1`, unlike `int` where `42` stays `42`. In C23, `bool` became a built-in keyword, but including the header remains portable and harmless. ## Example This example shows that bool truncates non-zero values to 1. ```c // compile: gcc -std=c99 -o stdboolexample stdboolexample.c // run: ./stdboolexample // description: bool type behavior with various values #include #include int main() { bool a = 42; bool b = -1; bool c = 0; int d = 42; printf("bool(42) = %d\n", a); printf("bool(-1) = %d\n", b); printf("bool(0) = %d\n", c); printf("int(42) = %d\n", d); return 0; } ```