Printf common formats

% D decimal integer
% X,% o,% b hexadecimal, octal, binary integer.
% F,% g,% e floating point: 3.141593 3.141592653589793 3.141593e + 00
% T Boolean: true or false
% C character (rune) (Unicode code points)
% S string
String% q double quotes "abc" or single quotes character 'c'
V% natural form variables (natural format)
% T type variable
%% literal percent sign flag (no operand) 
\ T tab
\ n newline

  

 

Guess you like

Origin www.cnblogs.com/tomhuang/p/11648805.html