问题
I sometimes find this inconvenient when doing bit manipulation (though I can't recall to mind any specific examples right now). I also find it conceptually confusing, since shifts are basically multiplication and division by powers of two.
I see that it can be convenient in C++, when using << to send output to an ostream, but of course that can't be used to explain how the order was originally fixed in C.
回答1:
Because that's what the authors of the C language decided.
Use parentheses to avoid confusion.
来源:https://stackoverflow.com/questions/9370844/why-do-shifts-have-lower-precedence-than-addition-and-subtraction-in-c