Wednesday, 16 November 2016

Bitmask Check

#include<bits/stdc++.h>

using namespace std;


int main(){

    char bitmaskCh = 'C';


    if((bitmaskCh & 0b00100000) == 0){

        cout << "uppercase";

    }

    if((bitmaskCh & 0b00100000) == 0b00100000){

        cout << "lowercase";

    }


return 0;

}

No comments:

Post a Comment