Hacker News new | past | comments | ask | show | jobs | submit login

There actually are guarantees, they're just a guarantee of ranges. (When bit-twiddling, you always want to use the unsigned version.)

char is guaranteed to be at least 8 bits.

short is guaranteed to be at least 16 bits.

int is guaranteed to be at least 16 bits.

long is guaranteed to be at least 32 bits.

long long is guaranteed to be at least 64 bits.

unsigned long is guaranteed to be the same size as a pointer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: