Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #Xor #implementation
ADD COMMENT
Topic
Name
2+6 =