Q bitwase operater c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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; }

11th Aug 2020, 5:03 AM
๐“ก๐“ช๐“ฐ๐“ฑ๐“ช๐“ฟ ๐“ก๐“ธ๐“ถ๐“ฎ๐“ธ
๐“ก๐“ช๐“ฐ๐“ฑ๐“ช๐“ฟ ๐“ก๐“ธ๐“ถ๐“ฎ๐“ธ - avatar
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
11th Aug 2020, 5:50 AM
Aditya
Aditya - avatar
+ 1
But where is error in my program?
11th Aug 2020, 6:58 AM
๐“ก๐“ช๐“ฐ๐“ฑ๐“ช๐“ฟ ๐“ก๐“ธ๐“ถ๐“ฎ๐“ธ
๐“ก๐“ช๐“ฐ๐“ฑ๐“ช๐“ฟ ๐“ก๐“ธ๐“ถ๐“ฎ๐“ธ - avatar
0
Also take a look at std::bitset https://code.sololearn.com/c5OU4c44pQl4/#cpp
11th Aug 2020, 6:14 AM
Ockert van Schalkwyk
Ockert van Schalkwyk - avatar