CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Bitwise AND, OR, XOR

C++ code walkthrough · Question 26
mediumOperators

Code

Read carefully. What does this print?
1#include <iostream>
2using namespace std;
3int main() {
4 int a = 6, b = 3;
5 cout << (a & b) << " " << (a | b) << " " << (a ^ b) << endl;
6 return 0;
7}

Your answer