C language in print format

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.

 

Guess you like

Origin www.cnblogs.com/dhu121/p/11354556.html