The format characters commonly used in C language are as follows:
Format character |
Function |
%o |
Output integers in unsigned eight- binary form |
%x |
Output integers in unsigned 16- binary form |
%u |
Output integers in unsigned 10 binary form |
%d |
Outputs integers in signed 10 binary form (but positive numbers do not output a plus +) |
%i |
Outputs integers in signed 10 binary form (but positive numbers do not output a plus +), old-fashioned notation, equals%d |
%c |
Output one character |
%s |
Output One or more characters |
%f |
output single-, double-precision numbers in decimal form with 6-bit decimals by default |
%e |
output single-and double-precision numbers in standard exponential form (i.e. scientific notation) , the number of fractional decimal digits default to 6 bits |
|
|
|
|
|
|
The usual escape characters for C are as follows:
Escape character |
Function |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Format characters and escape characters