Answers for "xor logical operator c++"

C++
1

Xor implementation C++

#include <iostream>
using namespace std;
  
int main() {
      // a = 5(00000101), b = 9(00001001)
    int a = 5, b = 9;
  
    // The result is 00001100
    cout << "a ^ b = " << (a ^ b) << endl;
  
    return 0;
}
  
//Output 
a^b = 12
Posted by: Guest on March-06-2022

Browse Popular Code Answers by Language