Sunday, November 21, 2010

FORMAT SPECIFIERS in C


There are several format specifiers available in C. The format specifier are used to print data values. Format Specifiers depend upon the data type
There are many format specifiers defined in C. Take a look at the following list:
%i or %dint
%cchar
%ffloat
%lfdouble
%sstring
%o     The unsigned octal format specifier.
%hd  short integer
%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