C++ defines a dedicated boolean type named bool, representing logical truth values:
truefalseExample:
bool isReady = true;
C inherits this (C99 and newer), but in classic C, booleans were represented using integers.
The data type bool allocates 8 bits of memory, but only one bit is needed, which is wasteful.
Bit fields