Fixed Width Integer Types since C99
suggest changeThe header <stdint.h> provides several fixed-width integer type definitions. These types are optional and only provided if the platform has an integer type of the corresponding width, and if the corresponding signed type has a two’s complement representation of negative values.
See Data Types for when these types are a good fit.
#include <stdint.h>
uint32_t u32 = 32; /* Exactly 32 bits wide. */
uint8_t u8 = 255; /* Exactly 8 bits wide. */
int64_t i64 = -65; /* Exactly 64 bits, two's complement. */
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents