On this page
uint64_t
Prev: uint32_t | Up: stdint.h | Next: uintptr_t
Rel: stdint.h, stdint, stdbool & limits Guide
Ref: cppreference — uint64_t
Tags: #public #prog #c #stdlib #stdint #tier/core
Include
#include <stdint.h>
Signature & Overview
typedef /* unsigned 64-bit */ uint64_t;
Exact 64-bit unsigned integer for hashes (FNV-1a), bitsets, and monotonic counters.
Notes & Pitfalls
- Exact 64-bit unsigned integer: Use
ULLsuffix for large literals andPRIu64forprintf.
Example
#include <assert.h>
#include <stdint.h>
int main(void) {
uint64_t bytes = 1ULL << 32;
assert(sizeof(bytes) == 8 && bytes > 0);
}
Linked from
Related notes
- tuts/c/stdlib/stdint/uint32_t Linked here; links to this page; shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/stdint/uintptr_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/uint8_t shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/assert/assert shared tags: #c, #prog, #stdlib, #tier