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?
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?
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.