Print Type | printf format control in the placeholder | Remark |
short | %hd | You're not wrong, there really is h |
int | %d | |
long | %ld | l can only lowercase, can not be written large L |
Octal long | %the | Ditto |
Hex long | %lx | Ditto |
unsigned int | in% | |
unsigned long | % Lu | Ditto |
long long | % LLD | Ditto |
unsigned long long | % host | Ditto |
===================================================================
FIG content C language is the printf (); in the format of the control data corresponding placeholder type.
Excerpt from "C Primer Plus" sixth edition of 51.