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:
specifierOutputExample
c Charactera
d or i Signed decimal integer392
e Scientific notation (mantise/exponent) using e character3.9265e+2
E Scientific notation (mantise/exponent) using E character3.9265E+2
f Decimal floating point392.65
g Use the shorter of %e or %f392.65
G Use the shorter of %E or %f392.65
o Signed octal610
s String of characterssample
u Unsigned decimal integer7235
x Unsigned hexadecimal integer7fa
X Unsigned hexadecimal integer (capital letters)7FA
p Pointer addressB800:0000
nNothing 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.

No comments:

Post a Comment

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...