Why is sizeof(int) = 4 in 64-bit systems?
If you lack a basic understanding of the size of various data types, I suggest you take a look at: http://programmingbytes.tumblr.com/post/124121068726/what-is-sizeof-int
There are currently 5 main data models:
LP64
ILP64
LLP64
ILP32
LP32
Datatype LP64 ILP64 LLP64 ILP32 LP32 char 8 8 8 8 8 short 16 16 16 16 16 int 32 64 32 32 16 long 64 64 32 32 32 long long 64 pointer 64 64 64 32 32
Depending on the data model used by your compiler, the size of primitive data types shall vary.
Have a read through: http://www.unix.org/version2/whatsnew/lp64_wp.html
















