How to judge how many bytes a character occupies?
Different types of characters are different under different operating system platforms, such as: (1) 32-bit platform: there are two types: signed and unsigned. Signed type: short occupies two bytes of memory, ranging from-215 ~ (215-1) int occupies four bytes of memory, ranging from -2 3 1 ~ (2 3 1-65433). Unsigned types with the range of-231~ 231-1:the highest bit does not mean that unsigned short integers occupy two bytes of memory, and the range is 0 ~ 2 16- 1 unsigned integers occupy four bytes of memory. An unsigned Long with the range of 0 ~ 2 32- 1 occupies four bytes of memory, with the range of 0 ~ 2 32- 1. Real variables: single precision float and double precision double: float: occupy four bytes and provide 7~8 significant digits.