bool sunIsStar = true;
// 第一种方法:选一个词
const char *strSun = sunIsStar ? "true" : "false";
//strSun is "true"
// 第二种方法:用数字,printf 没有 bool 格式
bool earthIsStar = false;
char strEarth[8];
snprintf(strEarth, sizeof strEarth, "%d", earthIsStar);
//strEarth is "0"
printf("strSun is %s\n", strSun);
printf("strEarth is %s\n", strEarth);