Why do shifts have lower precedence than addition and subtraction in C?

前端 未结 1 1294
慢半拍i
慢半拍i 2021-01-18 19:35

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

相关标签:
1条回答
  • 2021-01-18 19:50

    Because that's what the authors of the C language decided.

    Use parentheses to avoid confusion.

    0 讨论(0)
提交回复
热议问题