Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

format specifiers in c

SPECIFIER  USED FOR
%c			  a single character
%s			  a string
%hi			  short (signed)
%hu			  short (unsigned)
%Lf			  long double
%n			  prints nothing
%d			  a decimal integer (assumes base 10)
%i			  a decimal integer (detects the base automatically)
%o			  an octal (base 8) integer
%x			  a hexadecimal (base 16) integer
%p			  an address (or pointer)
%f			  a floating point number for floats
%u			 int unsigned decimal
%e			 a floating point number in scientific notation
%E			 a floating point number in scientific notation
%%			 the % symbol
 
PREVIOUS NEXT
Tagged: #format #specifiers
ADD COMMENT
Topic
Name
8+7 =