How many bytes of unsigned int
In C language, unsigned int represents an unsigned integer type. There is no definite rule on how many bytes it occupies. It is determined by the compiler. For example, Visual C stipulates that unsigned int occupies 4 bytes. In Turbo 2.0, it stipulates that unsigned int occupies 2 bytes, which means that int can occupy 2 bytes. Bytes can also occupy 4 bytes, which is determined by the compilation system.
Recommended learning:c language video tutorial
For example, Visual C stipulates as follows:
The compiler can choose the appropriate size according to its own hardware, but it needs to meet the constraints: short and int types are at least 16 bits (2 bytes), long type is at least 32 bits (4 bytes), and short Type length cannot exceed type int, and type int cannot exceed type long. This means that the variable length of each type is determined by the compiler, andIn current mainstream compilers, the int type in 32-bit machines and 64-bit machines is generally 4 bytes.
For moreIntroduction to Programmingknowledge, please pay attention to the PHP Chinese website!
The above is the detailed content of unsigned int several bytes. For more information, please follow other related articles on the PHP Chinese website!