+ 1
Q bitwase operater c++
//#include <iostream> //using namespace std; #include<stdio.h> int main() { int a=5,b=9; cout<<"a="<<a<<"b="<<b; cout<<" a&b="<<a&b; cout<<"\n a|b="<<a|b; cout<<"\n a^b="<<a^b; cout<<"\n ~a="<<~a; cout<<"\n b<<1="<<(b<<1); cout<<"\n b>>1="<<(b>>1); return 0; }
3 Answers
+ 10
Bitwise operators perform operations on integer data at the individual bit-level. These operations include setting, or shifting the actual bits.
Also please include relevant tags before posting any question.
//Unclear question
https://www.sololearn.com/discuss/333866/?ref=app
+ 1
But where is error in my program?
0
Also take a look at std::bitset
https://code.sololearn.com/c5OU4c44pQl4/#cpp