Can I assume the size of long int is always 4 bytes?

Viewed 34751

Is it always true that long int (which as far as I understand is a synonym for long) is 4 bytes?

Can I rely on that? If not, could it be true for a POSIX based OS?

10 Answers

No, you can't assume that since the size of the “long” data type varies from compiler to compiler.
Check out this article for more details.

Related