First of all, let me tell you, the code you provided is for precision control, not field width. For short form **
%A.B<format specifier>
Adenotes the width of the field and Bmakes precision.
, C11, Β§7.21.6.1, fprintf() ( )
%. %, :
[..]
- ,
d, i, o, u, x x, , A, A, e, e, f f g g, , s. (.), asterisk * ( ) ; . , undefined.
, , , , . int . [...]
,
printf("\"%.*s\"\n", i, text);
i, .
( )
%
<Zero or more flags>
<optional minimum field width>
<optional precision>
<optional length modifier>
<A conversion specifier character>