【发布时间】:2014-08-27 14:50:22
【问题描述】:
考虑以下代码:
long store;
int firstValue = 0x1234;
int secondValue = 0x5678;
store = (((long) firstValue) << 32) | secondValue;
无论机器的字节序如何,store 是否保证具有 0x12345678 的值...
- 在 Java 中?
- 在 C 或 C++ 中?
【问题讨论】:
标签: java c++ c bitwise-operators endianness