C Program For Boolean to String Conversion Improve Improve Improve Like Article Like Save Article Save Share Report issue Report To convert boolean to string in C we will use the following 2 approaches: Using Conditional StatementsUsing Ternary Operator Input: bool n = true Output: string true1. Using Conditional Statements C // C program to demonstrate Boolean to String// Conversion using conditional statements#include <stdbool.h>#include <stdio.h>int main(){ bool n = true; if (n == true) { printf("true"); } else { printf("false"); } return 0;} Outputtrue2. Using the ternary operator C // C program to demonstrate Boolean to String// Conversion using ternary operator#include <stdbool.h>#include <stdio.h>int main(){ bool n = true; const char* s = (n == true) ? "true" : "false"; printf("%s", s); return 0;} Outputtrue Last Updated : 07 Sep, 2022 Like Article Save Article Previous C Program to Print 180 Degree Rotation of Inverted Half Pyramid Next C Program to Interchange Elements of First and Last in a Matrix Across Columns Share your thoughts in the comments Add Your Comment Please Login to comment...