Answers for "TO CHECK ith BIT IS SET OR NOT OF A NUMBER"

0

TO CHECK ith BIT IS SET OR NOT OF A NUMBER

x = num & (1 << (i-1));
if(x) cout<<"set"<<endl;
else cout<<"not set"<<endl;
Posted by: Guest on May-30-2021

Code answers related to "TO CHECK ith BIT IS SET OR NOT OF A NUMBER"

Browse Popular Code Answers by Language