Why does 3,758,096,384 << 1 give 768

匆匆过客 提交于 2019-12-02 06:34:28

That's the comma operator at work. It's actually 384 << 1. (The comma operator evaluates its left hand side, then evaluates its right hand side, and returns the right hand side.)

It returns 768 because you're incorrectly using the comma operator. 3,758,096,384 << 1 will actually be 384 << 1 because the comma operator will return the last operand.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!