specifier | Output | Example |
---|---|---|
c | Character | a |
d or i | Signed decimal integer | 392 |
e | Scientific notation (mantise/exponent) using e character | 3.9265e+2 |
E | Scientific notation (mantise/exponent) using E character | 3.9265E+2 |
f | Decimal floating point | 392.65 |
g | Use the shorter of %e or %f | 392.65 |
G | Use the shorter of %E or %f | 392.65 |
o | Signed octal | 610 |
s | String of characters | sample |
u | Unsigned decimal integer | 7235 |
x | Unsigned hexadecimal integer | 7fa |
X | Unsigned hexadecimal integer (capital letters) | 7FA |
p | Pointer address | B800:0000 |
n | Nothing printed. The argument must be a pointer to a signed int, where the number of characters written so far is stored. | |
% | A % followed by another % character will write % to stdout. |
if debugging is the art of removing bugs, then programming must be the art of inserting them..
Dec 10, 2009
printf
Where specifier is the most significant one and defines the type and the interpretation of the value of the coresponding argument:
Subscribe to:
Post Comments (Atom)
Visual Studio Keyboard Shortcuts
Playing with keyboard shortcuts is very interesting and reduce the headache of using the mouse again and again while programming with visu...
-
Delete: /YOUR PATH TO WORKSPACE/.metadata/.plugins/org.eclipse.core.resources
-
Playing with keyboard shortcuts is very interesting and reduce the headache of using the mouse again and again while programming with visu...
-
Unity NavMesh vs Apex Path vs A* Pathfinding Project Update June 2017: Unity 5.6 comes with improved NavMeshes! They are now component-b...
No comments:
Post a Comment