+ 1
about range of data type.
im confused about range of data like int range is 2,147,483,684 how we calculate that ?and why when its minus it add number at the end of number??
1 Réponse
+ 1
The range is due to an int having a 4 byte size. That's 32 bits which gives you a data range of 2^32 or 0 to 2^32-1 = 4294967295. A signed int can also express negative values. The range is divided in two. The range for a signed int is -2,147,483,648 to 2,147,483,647. The negative side is one more because 0 is counted for the positive side.