how to check odd no. in c++ using logical and

C++
#include <iostream>  
using namespace std;  
    
bool isEven(int n)  
{  
    return (!(n & 1));  
}  
   
int main()  
{  
    int n = 101;  
    isEven(n) ? cout << "Even" : cout << "Odd";  
    return 0;  
}  

Source

Also in C++: