...
The following table summarizes C-compliant conversion specifiers along with the flag characters valid for each specification (the apostrophe ('
), -
, +, the space character, and #
in columns 2 through 5) and length modifiers (h
, hh
, l
, ll
, j
, z
, t
, and L
in columns 6 through 13) and the type of the expected argument. Valid and meaningful combinations of a conversion specification, flag character, and length modifier is denoted by the symbol in the corresponding cell or by the name of the type argument affected by the length modifier. Valid combinations that have no effect are denoted by N/E. Using a combination of a conversion specification, flag character, and length modifier denoted by the symbol or a specification not listed in the table, or using an argument of an unexpected type, may result in undefined behavior. See undefined behaviors 153, 155, 157, 158, 161, and 162 in Annex J of C11the C Standard.
Conversion |
|
|
|
|
|
|
|
|
|
|
|
|
| Argument |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
|
| signed integer | |||||
|
|
|
|
|
|
|
|
| unsigned integer | |||||
|
|
|
|
|
|
|
|
| unsigned integer | |||||
|
|
|
|
|
|
|
|
| unsigned integer | |||||
|
|
|
|
|
|
|
|
| unsigned integer | |||||
|
| N/E | N/E |
|
| |||||||||
|
| N/E | N/E |
|
| |||||||||
|
| N/E | N/E |
|
| |||||||||
|
| N/E | N/E |
|
| |||||||||
|
|
|
| |||||||||||
|
| NTWS | NTBS or NTWS | |||||||||||
|
|
| ||||||||||||
|
|
|
|
|
|
|
|
| pointer to integer | |||||
|
|
| ||||||||||||
|
| NTWS | ||||||||||||
|
| none |
...
[ISO/IEC 9899:2011] | Section 7.21.6.1, "The fprintf Function" |