On this page
int64_t
Prev: int32_t | Up: stdint.h | Next: uint8_t
Rel: stdint.h, stdint, stdbool & limits Guide
Ref: cppreference — int64_t
Tags: #public #prog #c #stdlib #stdint #tier/core
Include
#include <stdint.h>
Signature & Overview
typedef /* signed 64-bit */ int64_t;
Exact 64-bit two's complement signed integer for timestamps, file sizes, and currency cents.
Notes & Pitfalls
- Exact 64-bit signed integer: Print portably with
PRId64from<inttypes.h>.
Example
#include <assert.h>
#include <stdint.h>
int main(void) {
int64_t ts = 1700000000000LL;
assert(sizeof(ts) == 8 && ts > 0);
}
Linked from
Related notes
- tuts/c/stdlib/stdint/int32_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/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/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/uintptr_t shared tags: #c, #prog, #stdint, #stdlib, #tier
- tuts/c/stdlib/assert/assert shared tags: #c, #prog, #stdlib, #tier