C doesn\'t have any built-in boolean types. What\'s the best way to use them in C?
Nowadays C99 supports boolean types but you need to #include .
#include
Example:
#include int main() { bool arr[2] = {true, false}; printf("%d\n", arr[0] && arr[1]); printf("%d\n", arr[0] || arr[1]); return 0; }
Output:
0 1