C language prints boolean types in string form

C language prints boolean types in string form
printf("%s", x ? "true" : "false");
Sou‮cr‬e:www.lautturi.com

You can define a macro

#define formatBool(b) ((b) ? "true" : "false")
printf("%s", formatBool(true));   
printf("%s", formatBool(false));
Created Time:2017-08-29 05:09:29  Author:lautturi