Wednesday, October 13, 2010

Format Specifiers for C

Format Specifiers for C



%c     The character format specifier.
%d     The integer format specifier.
%i     The integer format specifier (same as %d).
%f     The floating-point format specifier.
%e     The scientific notation format specifier.
%E     The scientific notation format specifier.
%g     Uses %f or %e, whichever result is shorter.
%G     Uses %f or %E, whichever result is shorter.
%o     The unsigned octal format specifier.
%s     The string format specifier.
%u     The unsigned integer format specifier.
%x     The unsigned hexadecimal format specifier.
%X     The unsigned hexadecimal format specifier.
%p     Displays the corresponding argument that is a pointer.
%n     Records the number of characters written so far.
%%     Outputs a percent sign.

No comments:

Post a Comment