When I started learning C from a book, it was mentioned that sizeof(int) is 2 bytes. I believed it blindly and never bothered to try it!!
But when I did, I was surprised to see that the sizeof(int) is actually 4 bytes (the same as that of long int). I was told that it was because I tried on a 32-bit machine! I know that on a 16-bit machine it is 2 bytes, as it should be!!
Can neone explain how the sizeof(int) depends on the how_many-bit machine I'm using, while the sizeof(other_datatypes) don't change??
Also how much will the sizeof(int) be on a 64-bit machine??