On this page
uint32_t
Prev: uint8_t | Up: stdint.h | Next: uint64_t
Rel: stdint.h, stdint, stdbool & limits Guide
Ref: cppreference — uint32_t
Tags: #public #prog #c #stdlib #stdint #tier/core
Include
#include <stdint.h>
Signature & Overview
typedef /* unsigned 32-bit */ uint32_t;
Exact 32-bit unsigned integer for bitmasks, CRC32, and binary formats.
Notes & Pitfalls
- Exact 32-bit unsigned integer: Wraps cleanly modulo $2^{32}$—ideal for CRCs, bitmasks, and IPv4 addresses.
Example
#include <assert.h>
#include <stdint.h>
int main(void) {
uint32_t mask = 0xFF00FF00u;
assert(sizeof(mask) == 4 && (mask >> 24) == 0xFFu);
}
Linked from
Related notes
- tuts/c/stdlib/stdint/uint64_t Linked here; links to this page; shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/stdint/uint8_t Linked here; links to this page; shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/stdint Linked here; links to this page; shared tags: #c, #prog, #stdint, #stdlib
- tuts/c/stdlib/stdint_stdbool_and_limits Linked here; shared tags: #c, #prog, #stdlib
- tuts/c/stdlib/stdint/int32_t shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/stdint/int64_t shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/stdint/PRIu64 shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/stdint/SIZE_MAX shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/stdint/uintptr_t shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/assert/assert shared tags: #c, #prog, #stdlib, #tier