Name | Description | Notes | Source | Availability | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
INT64_ |
Maximum value of
int64_t |
L | ? | M | <stdint.h> |
C99 | C11 | ||||
INT64_ |
Minimum value of
int64_t |
L | ? | M | <stdint.h> |
C99 | C11 | ||||
int64_t |
Signed integer type of exactly 64 bits | L | ? | T | <stdint.h> |
C99 | C11 | ||||
PRId64 |
Decimal output conversion specifier for
int64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
PRIi64 |
Decimal output conversion specifier for
int64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
PRIo64 |
Octal output conversion specifier for
uint64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
PRIu64 |
Decimal output conversion specifier for
uint64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
PRIX64 |
Hexdecimal output conversion specifier for
uint64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
PRIx64 |
Hexdecimal output conversion specifier for
uint64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
SCNd64 |
Decimal input conversion specifier for
int64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
SCNi64 |
General input conversion specifier for
int64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
SCNo64 |
Octal input conversion specifier for
uint64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
SCNu64 |
Decimal input conversion specifier for
uint64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
SCNx64 |
Hexdecimal input conversion specifier for
uint64_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
UINT64_ |
Maximum value of
uint64_t |
L | ? | M | <stdint.h> |
C99 | C11 | ||||
uint64_t |
Unsigned integer type of exactly 64 bits | L | ? | T | <stdint.h> |
C99 | C11 |
uint64_t
and
int64_t
are optional integer types of exactly 64 bits. Both types
have no padding, and
int64_t
uses 2's complement.
uint64_t
is unsigned, and has the range zero to
UINT64_
, which is [0,
+18446744073709551615].
int64_t
is signed, and has the range
INT64_
to
INT64_
, which is [−9223372036854775808,
+9223372036854775807].
The following macros can be used in the fmt
argument of printf
to print arguments of types
uint64_t
and
int64_t
:
PRIu64
PRIo64
PRIx64
PRIX64
PRId64
PRIi64
The following macros can be used in the fmt
argument of scanf
to scan arguments of types
uint64_t *
and
int64_t *
:
SCNu64
SCNo64
SCNx64
SCNd64
SCNi64
The existence of macros such as
PRIu64
can be used to detect the existence of
uint64_t
with conditional compilation.
Related types:
uint64_t
int64_t
uint_
least64_t int_
least64_t uint_
fast64_t int_
fast64_t
Property |
uint64_t |
int64_t |
|
---|---|---|---|
Width (bits) | 64 | ||
Lowest value | 0 | −9223372036854775808 | |
Highest value | +18446744073709551615 | +9223372036854775807 | |
printf |
base 10 | "%"
PRIu64 |
"%"
PRId64 or "%"
PRIi64 |
base 8 | "%"
PRIo64 |
||
upper-case base 16 | "%"
PRIX64 |
||
lower-case base 16 | "%"
PRIx64 |
||
scanf |
base 10 | "%"
SCNu64 |
"%"
SCNd64 |
base 8 | "%"
SCNo64 |
||
base 16 | "%"
SCNx64 |
||
base 16, 8 or 10 by prefix | "%"
SCNi64 |