Boolean in C

By default, the boolean type in C does not exist, but you can use preprocessor directives. Make your own.

#include <stdio.h> #ifndef __cplusplus typedef char bool; #define true 1 #define false 0 #endif

Article author: Andrei Olegovich