#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
Code Example |
---|
Cpp :: read and write file in c++ |
Cpp :: file c++ |
Cpp :: OpenGL C++ Version |
Cpp :: declaring 2d dynamic array c++ |
Cpp :: 2-Dimensional array in c++ |
Cpp :: stl sort in c++ |
Cpp :: c++ Sum of all the factors of a number |
Cpp :: c++ loop vector |
Cpp :: how to dynamically allocate an array c++ |
Cpp :: check if set contains element c++ |
Cpp :: remove from vector by value c++ |
Cpp :: Accpt array input in single line in cpp |
Cpp :: find prime number c++ |
Cpp :: team fortress |
Cpp :: How to write into files in C++ |
Cpp :: power of two c++ |
Cpp :: print vector c++ |
Cpp :: getline(cin string) not working |
Cpp :: argument vs parameter coding c++ |
Cpp :: setw c++ |
Cpp :: stack implementation through linked list |
Cpp :: c++ hash combine |
Cpp :: c++ string slicing |
Cpp :: travelling salesman problem c++ |
Cpp :: std::count() in C++ STL |
Cpp :: c++ region |
Cpp :: read string with spaces in c++ |
Cpp :: kmp algorithm c++ |
Cpp :: selection sort c++ |
Cpp :: cpp gui |