| Name | Description | Notes | Source | Availability | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
atomic_ |
Atomic integer type | ? | T | <stdatomic.h> |
C11 | ||||||
atomic_ |
Atomic integer type | ? | T | <stdatomic.h> |
C11 | ||||||
INTPTR_ |
Maximum value of
intptr_t |
L | ? | M | <stdint.h> |
C99 | C11 | ||||
INTPTR_ |
Minimum value of
intptr_t |
L | ? | M | <stdint.h> |
C99 | C11 | ||||
intptr_t |
Signed integer type capable of storing a pointer | L | ? | T | <stdint.h> |
C99 | C11 | ||||
PRIdPTR |
Decimal output conversion specifier for
intptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
PRIiPTR |
Decimal output conversion specifier for
intptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
PRIoPTR |
Octal output conversion specifier for
uintptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
PRIuPTR |
Decimal output conversion specifier for
uintptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
PRIXPTR |
Hexdecimal output conversion specifier for
uintptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
PRIxPTR |
Hexdecimal output conversion specifier for
uintptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
SCNdPTR |
Decimal input conversion specifier for
intptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
SCNiPTR |
General input conversion specifier for
intptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
SCNoPTR |
Octal input conversion specifier for
uintptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
SCNuPTR |
Decimal input conversion specifier for
uintptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
SCNxPTR |
Hexdecimal input conversion specifier for
uintptr_t |
? | M | <inttypes.h> |
C99 | C11 | |||||
UINTPTR_ |
Maximum value of
uintptr_t |
L | ? | M | <stdint.h> |
C99 | C11 | ||||
uintptr_t |
Unsigned integer type capable of storing a pointer | L | ? | T | <stdint.h> |
C99 | C11 | ||||
uintptr_t and
intptr_t are optional integer types of at least 16 bits, capable of
holding a pointer to an object.
uintptr_t is unsigned, and has the range zero
to UINTPTR_,
which is at least [0, +65535].
intptr_t is signed, and has the range
INTPTR_
to INTPTR_,
which is at least [−32767, +32767].
The following macros can be used in the fmt argument of printf to print arguments of types
uintptr_t and
intptr_t:
PRIuPTRPRIoPTRPRIxPTRPRIXPTRPRIdPTRPRIiPTR
The following macros can be used in the fmt argument of scanf to scan arguments of types
uintptr_t * and
intptr_t *:
SCNuPTRSCNoPTRSCNxPTRSCNdPTRSCNiPTR
atomic_
is an alias for _Atomic
uintptr_t. atomic_
is an alias for _Atomic
intptr_t.
| Property |
uintptr_t |
intptr_t |
|
|---|---|---|---|
| Minimum width (bits) | 16 | ||
| Lowest value | 0 | ≤−32767 | |
| Highest value | ≥+65535 | ≥+32767 | |
printf |
base 10 | "%"
PRIuPTR |
"%"
PRIdPTR or "%"
PRIiPTR |
| base 8 | "%"
PRIoPTR |
||
| upper-case base 16 | "%"
PRIXPTR |
||
| lower-case base 16 | "%"
PRIxPTR |
||
scanf |
base 10 | "%"
SCNuPTR |
"%"
SCNdPTR |
| base 8 | "%"
SCNoPTR |
||
| base 16 | "%"
SCNxPTR |
||
| base 16, 8 or 10 by prefix | "%"
SCNiPTR |
||