Answers for "xor in c++"

C++
0

xor in c++

int a = 5;     // 0101b  (0x05)
int b = 9;     // 1001b  (0x09)
int c = a ^ b; // 1100b  (0x0C)

std::cout << "a = " << a << ", b = " << b << ", c = " << c << std::endl;
Posted by: Guest on July-08-2021

Browse Popular Code Answers by Language