Since ANSI C99 there is _Bool or bool via stdbool.h. But is there also a printf format specifier for bool?
_Bool
bool
stdbool.h
printf
I mean
To just print 1 or 0 based on the boolean value I just used:
printf("%d\n", !!(42));
Especially useful with Flags:
#define MY_FLAG (1 << 4) int flags = MY_FLAG; printf("%d\n", !!(flags & MY_FLAG));