📜  c |= 运算符 - C 编程语言代码示例

📅  最后修改于: 2022-03-11 15:04:34.011000             🧑  作者: Mango

代码示例2
// | is the binary "or" operator
// a |= b is equivalent to a = a|b

#include 

int main() {
   int a = 10;  // 00001010 in binary
   int b = 6;   // 00000110 in binary

   printf("Result : %d\n", a |= b);
   // Result is 14 which is OOOO111O in binary

   return 0;
}