| 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...
-
A quick reference for working with AGAL, the new shader language for use with Stage3D introduced with Flash Player 11. Registers: Each r...
-
The Linux file system is the structure in which all the information on your computer is stored.Files are organized within a hierarchy of dir...
-
http://www.dgp.toronto.edu/~rms/links.html Papers Ke-Sen Huang's comprehensive and invaluable Conference Paper Link Archive Mesh Libra...
No comments:
Post a Comment