Bool is a data type in C++ which takes two values- True and False. Syntax is as follows:
bool b1 = true;
A sample code is as follows:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include<iostream>
using namespace std;
int main()
{
int a= 60, b= 70;
bool c, d;
c= a== b; // false
c= a< b; // true
cout <<b1;
cout << b2 ;
return 0;
}
Posted Date:- 2021-08-24 05:26:27
Which is the best C++ compiler?
Which operator cannot be overloaded in C++ ?
What differences separate structure from a class in C++?
Can we provide one default constructor for our class?
What is the default constructor?
Is it possible for a C++ program to be compiled without the main() function?
What Is A Unnitialised Pointer?
What Is The Disadvantage Of Using A Macro?
What Do You Mean By Global Variables?
What are logical error and how does it differ from syntax error?
How to run C++ program in cmd?
Explain the significance of vTable and vptr in C++ and how the compiler deals with them
Can we declare variable anywhare in c ?
Control Statements or Control Flow ?
How to download turbo C++ for windows 10?
What is operator overloading in C++?
Can we use a continue statement without using a loop?
What is the difference between the text file and a binary file?
What is the importance of an algorithm in C programming?
Can we have a recursive inline function in C++?
What is the function of the keyword “Volatile�
Briefly explain the concept of Inheritance in C++.
Can we call C++ OOPS? and Why?
What are the User-defined Functions?
What are the Pre-defined Functions?
What are the differences between references and pointers?
What are the differences between C and C++?
What Are Structures And Unions?
Types of errors in c?
Errors in c programming are divid