| 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:
PRIu64PRIo64PRIx64PRIX64PRId64PRIi64
The following macros can be used in the fmt argument of scanf to scan arguments of types
uint64_t * and
int64_t *:
SCNu64SCNo64SCNx64SCNd64SCNi64
The existence of macros such as
PRIu64 can be used to detect the existence of
uint64_t with conditional compilation.
Related types:
uint64_tint64_tuint_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 |
||