Why integer stayed 4 bytes long when world transitioned to 64 bits?
I did some research on this topic and I decided to share my findings.
First reason: Standards
On most 32 bits systems type short is 2 bytes long, type int is 4 bytes long. But there are also standards.
According to C90 standard:
sizeof(short) <= sizeof(int) <= sizeof(long)
According to C99 standard:
sizeof(short) <= sizeof(int) <= sizeof(long) <= sizeof(long long)
If int size will 8 bytes long then there will be no type that it is 4 bytes long because due to standard, long type should be at least the same size as int type. It is possible to make short type 4 bytes long [...Read More]