Home » Uncategorized » Boolean in C

Boolean in C

This is a tutorial to use Boolean values i.e. True and False values in C. This tutorial has easy-to-follow syntax.

#include <stdio.h>
#include <stdbool.h>

int main(int argc, char **argv) {
	bool  t = false;
	// bool  t = true;

	if (t)
		printf("boolean variable is set to true\n");
	else
		printf("boolean variable is set to false\n");

	return 0;
}

We hope this tutorial is of help. In case you have any other suggestions or questions, do let us know in the comments!

Leave a Comment