Format Specifiers
Format Specifiers
char
%c Character
unsigned char
short
unsigned short
%d Signed Integer int
long
%e or %E Scientific notation of float values float
double
%f Floating point float
float
%g or %G Similar as %e or %E double
%hi Signed Integer(Short) short
%hu Unsigned Integer(Short) unsigned short
short
unsigned short
%i Signed Integer
int
long
%l or %ld or %li Signed Integer long
%lf Floating point double
%Lf Floating point long double
unsigned int
%lu Unsigned integer unsigned long
%lli, %lld Signed Integer long long
%llu Unsigned Integer unsigned long long
short
unsigned short
%o Octal representation of Integer. int
unsigned int
long
%s String char *
unsigned int
%u Unsigned Integer unsigned long
short
unsigned short
%x or %X Hexadecimal representation of Unsigned Integer int
unsigned int
long
%n Prints nothing
%% Prints % character
Format Specifier Type
%c Character
%d Signed integer
%e or %E Scientific notation of floats
%f Float values
%g or %G Similar as %e or %E
%hi Signed integer (short)
%hu Unsigned Integer (short)
%i Unsigned integer
%l or %ld or %li Long
%lf Double
%Lf Long double
%lu Unsigned int or unsigned long
%lli or %lld Long long
%llu Unsigned long long
%o Octal representation
%p Pointer
%s String
%u Unsigned int
%x or %X Hexadecimal representation
%n Prints nothing
%% Prints % character