In C, the bool
type is not a built-in data type, like int
or char
. We must import the following header file to use it.
#include <stdbool.h>
A bool variable is declared with the bool keyword.
bool isTrue = true;
bool isFalse = false;
bool isTrue;
isTrue = true;
bool isFalse;
isFalse = false;