How do I perform an unsigned right shift (>>> in Java) in C/C++?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- Multiple sockets for clients to connect to
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
In C, to get an unsigned shift, you just do a shift on an unsigned type.
Note that there is no guarantee that
>>
on a signed type gives you a signed shift in C -- this is implementation defined behavior. Most common implementations produce a signed shift if the type is signed, however.>>>
is unsigned right shift, so I would think that in C this would be the same as