How to use bool datatype?

please send me a simple code to understand that how can we use bool datatype.

Refer this

can’t you send me a simple code to understand the use of bool datatype instead of sharing the online links???

It is just as you use other data types.
Consider this case of linear search in array

int arr[4]={1,2,4,11};
bool found=false;
int key=4;
//Now check if 4 is present in the array
for(int i=0;i<4;i++)
{
if(arr[i]==key)
{
found=true;
break;
}
}
if(found) cout<<"Key is present in the array";
else cout<<"Key not present";