#include <strings.h>
// В C нет разбора "true"/"false": сравниваем текст.
const char *str1 = "true";
bool boolValue1 = strcmp(str1, "true") == 0;
//boolValue1 is true
// strcasecmp (POSIX) не учитывает регистр букв
const char *str2 = "TRUE";
bool boolValue2 = strcasecmp(str2, "true") == 0;
//boolValue2 is true
// "0" и "1" разбираем через число
const char *str3 = "0";
bool boolValue3 = strtol(str3, nullptr, 10) != 0;
//boolValue3 is false
printf("boolValue1 is %s\n", boolValue1 ? "true" : "false");
printf("boolValue2 is %s\n", boolValue2 ? "true" : "false");
printf("boolValue3 is %s\n", boolValue3 ? "true" : "false");