On this page
PRIu64
Prev: uintptr_t | Up: stdint.h | Next: SIZE_MAX
Rel: stdint.h, stdint, stdbool & limits Guide
Ref: cppreference — PRIu64
Tags: #public #prog #c #stdlib #stdint #tier/core
Include
#include <stdint.h>
Signature & Overview
#include <inttypes.h> /* PRIu64, PRId64, PRIx64 */
Format specifier macros expanding to the platform-correct printf modifier for 64-bit integers.
Notes & Pitfalls
- Portable
printfformat macro foruint64_t:uint64_tisunsigned longon Linux x86-64 (%lu) butunsigned long longon macOS/Windows (%llu)—PRIu64works everywhere.
Example
#include <inttypes.h>
#include <stdio.h>
int main(void) {
uint64_t big = 10000000000ULL;
printf("count=%" PRIu64 "\n", big);
}
Linked from
Related notes
- tuts/c/stdlib/stdint/SIZE_MAX 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/uint32_t shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/stdint/uint64_t 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