List of all format specifiers in C programming

In C programming we need lots of format specifier to work with various data types. Format specifiers defines the type of data to be printed on standard output. Whether to print formatted output or to take formatted input we need format specifiers. Format specifiers are also called as format string.

Here is a complete list of all format specifiers used in C programming language.

Read more – List of all data types in C

Format specifierDescriptionSupported data types
%cCharacterchar
unsigned char
%dSigned Integershort
unsigned short
int
long
%e or %EScientific notation of float valuesfloat
double
%fFloating pointfloat
%g or %GSimilar as %e or %Efloat
double
%hiSigned Integer(Short)short
%huUnsigned Integer(Short)unsigned short
%iSigned Integershort
unsigned short
int
long
%l or %ld or %liSigned Integerlong
%lfFloating pointdouble
%LfFloating pointlong double
%luUnsigned integerunsigned int
unsigned long
%lli, %lldSigned Integerlong long
%lluUnsigned Integerunsigned long long
%oOctal representation of Integer.short
unsigned short
int
unsigned int
long
%pAddress of pointer to void void *void *
%sStringchar *
%uUnsigned Integerunsigned int
unsigned long
%x or %XHexadecimal representation of Unsigned Integershort
unsigned short
int
unsigned int
long
%nPrints nothing
%%Prints % character