在 C++ 中,4&1 == 0, 和1&1 == 1. 但是,4&1 != 1&1评估为0,而不是1,但(4&1) != (1&1)仍按1预期评估。为什么是这样?
4&1 == 0
1&1 == 1
4&1 != 1&1
0
1
(4&1) != (1&1)
c++ bit-manipulation operator-precedence
bit-manipulation ×1
c++ ×1
operator-precedence ×1