unsigned int several bytes

angryTom
Release: 2020-03-05 13:22:31
Original
17061 people have browsed it

unsigned int several bytes

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:

unsigned int several bytes

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, and In current mainstream compilers, the int type in 32-bit machines and 64-bit machines is generally 4 bytes.

For more Introduction to Programming knowledge, 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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template