uint32_t --Unsigned 32bit integer type

"Uint32_t" is an unsigned 32-bit integer type. It can be used by including the " stdint.h" header. This is the type introduced in C99.

# Unsigned 32-bit integer type
uint32_t

The maximum value of an integer that can be represented by an unsigned 32-bit integer type is "4294967295", and the minimum value is "0".

The maximum value is defined by the macro " UINT32_MAX".

uint32_t sample code

This is a sample code using uint32_t. It exceeds the value of a signed 32-bit integer and uses the "U" suffix in the integer literal to indicate that it is an unsigned 32-bit integer.

#include <stdio.h>
#include <stdint.h>

int main (void) {
  uint32_t num = 4294967295U;
  
  printf("%u\n", num);
}

"%U" is used in the format specifier of printf function.

Output result.

4294967295

Associated Information