Boolean function returns only true or false. If the condition is correct it returns true else it returns false. Boolean functions are used to find the correctness of the condition.
C++ uses a built-in library(cctype) that contains boolean functions like isdigit(), islower(), isupper() etc. These functions work only on characters
#include<iostream>
#include<cctype>
using namespace std;
int main(){
char k;
cout<<"Enter a character : ";
cin>>k;
cout<<"It is a ";
if(isdigit(k))cout<<"Digit";
else if(islower(k))cout<<"Lower Case";
else if(isupper(k))cout<<"Upper Case";
else cout<<"Other Character";
return 0;
}


Other functions present are
- isdigit(k)
- islower(k)
- isupper(k)
- isspace(k)
- iscntrl(k)
- ispunct(k)
Try all of these functions.