devxlogo

Integers With Platform-Independent Width

Integers With Platform-Independent Width

The newly approved C99 standard defines a new header file called < inttypes.h >, which defines sets of typedef names for integer types. One of these sets defines integer types having certain exact widths:

  int8_t     int16_t     int32_t     int64_t

And their exact-width unsigned counterparts are:

  uint8_t    uint16_t    uint32_t    uint64_t

The names are rather intuitive. For example, int8_t is a signed integral type that occupies exactly eight bits. Likewise, uint8_t is an unsigned integral type that occupies exactly eight bits. Use these typedef names when you need integers whose widths are identical on every platform.

See also  The Importance of Red Teaming in Modern Cyber Defense Strategies
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist