📜  c++ 代码示例中的异或

📅  最后修改于: 2022-03-11 14:44:47.051000             🧑  作者: Mango

代码示例1
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;