Name | Description | Notes | Source | Availability | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
atomic_ |
Atomic integer type | ? | T | <stdatomic.h> |
C11 | ||||||
atomic_ |
Atomic integer type | ? | T | <stdatomic.h> |
C11 | ||||||
INT8_C() |
Create constant of type
int_ |
L | M | (·) | <stdint.h> |
C99 | C11 | ||||
INT_ |
Maximum value of
int_ |
L | M | <stdint.h> |
C99 | C11 | |||||
INT_ |
Minimum value of
int_ |
L | M | <stdint.h> |
C99 | C11 | |||||
int_ |
Smallest signed integer type with at least 8 bits | L | T | <stdint.h> |
C99 | C11 | |||||
PRIdLEAST8 |
Decimal output conversion specifier for
int_ |
M | <inttypes.h> |
C99 | C11 | ||||||
PRIiLEAST8 |
Decimal output conversion specifier for
int_ |
M | <inttypes.h> |
C99 | C11 | ||||||
PRIoLEAST8 |
Octal output conversion specifier for
uint_ |
M | <inttypes.h> |
C99 | C11 | ||||||
PRIuLEAST8 |
Decimal output conversion specifier for
uint_ |
M | <inttypes.h> |
C99 | C11 | ||||||
PRIXLEAST8 |
Hexdecimal output conversion specifier for
uint_ |
M | <inttypes.h> |
C99 | C11 | ||||||
PRIxLEAST8 |
Hexdecimal output conversion specifier for
uint_ |
M | <inttypes.h> |
C99 | C11 | ||||||
SCNdLEAST8 |
Decimal input conversion specifier for
int_ |
M | <inttypes.h> |
C99 | C11 | ||||||
SCNiLEAST8 |
General input conversion specifier for
int_ |
M | <inttypes.h> |
C99 | C11 | ||||||
SCNoLEAST8 |
Octal input conversion specifier for
uint_ |
M | <inttypes.h> |
C99 | C11 | ||||||
SCNuLEAST8 |
Decimal input conversion specifier for
uint_ |
M | <inttypes.h> |
C99 | C11 | ||||||
SCNxLEAST8 |
Hexdecimal input conversion specifier for
uint_ |
M | <inttypes.h> |
C99 | C11 | ||||||
UINT8_C() |
Create constant of type
uint_ |
L | M | (·) | <stdint.h> |
C99 | C11 | ||||
UINT_ |
Maximum value of
uint_ |
L | M | <stdint.h> |
C99 | C11 | |||||
uint_ |
Smallest unsigned integer type with at least 8 bits | L | T | <stdint.h> |
C99 | C11 |
uint_
and
int_
are the smallest integer types of at least 8
bits.
uint_
is unsigned, and has the
range zero to
UINT_
, which is at least [0,
+255].
int_
is signed, and has the range
INT_
to
INT_
, which is at least
[−127, +127].
The following macros can be used in the fmt
argument of printf
to print arguments of types
uint_
and
int_
:
PRIuLEAST8
PRIoLEAST8
PRIxLEAST8
PRIXLEAST8
PRIdLEAST8
PRIiLEAST8
The following macros can be used in the fmt
argument of scanf
to scan arguments of types
uint_
and
int_
:
SCNuLEAST8
SCNoLEAST8
SCNxLEAST8
SCNdLEAST8
SCNiLEAST8
atomic_
is an alias for
_Atomic
uint_
.
atomic_
is an alias for
_Atomic
int_
.
Related types:
uint8_t
int8_t
uint_
least8_t int_
least8_t uint_
fast8_t int_
fast8_t
Property |
uint_ |
int_ |
|
---|---|---|---|
Minimum width (bits) | 8 | ||
Lowest value | 0 | ≤−127 | |
Highest value | ≥+255 | ≥+127 | |
Constant |
UINT8_C(untyped-integer-constant) |
INT8_C(untyped-integer-constant) |
|
printf |
base 10 | "%"
PRIuLEAST8 |
"%"
PRIdLEAST8 or "%"
PRIiLEAST8 |
base 8 | "%"
PRIoLEAST8 |
||
upper-case base 16 | "%"
PRIXLEAST8 |
||
lower-case base 16 | "%"
PRIxLEAST8 |
||
scanf |
base 10 | "%"
SCNuLEAST8 |
"%"
SCNdLEAST8 |
base 8 | "%"
SCNoLEAST8 |
||
base 16 | "%"
SCNxLEAST8 |
||
base 16, 8 or 10 by prefix | "%"
SCNiLEAST8 |