Search
 
SCRIPT & CODE EXAMPLE
 

C

c format specifiers

%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
Comment

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
Comment

format specifiers in c

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
follow this for best answer with example: 
---------------------------------------------
https://www.freecodecamp.org/news/format-specifiers-in-c/
https://www.tutorialspoint.com/format-specifiers-in-c
Comment

PREVIOUS NEXT
Code Example
C :: how to open a file with open in c 
C :: fopen in c example 
C :: celsius to fahrenheit formula 
C :: int to char in c 
C :: arduino sketch structure 
C :: mpi example 
C :: measure time in c 
C :: Example of Implementation of a pointer to an array in C: 
C :: round float in c 
C :: Bootstrap textarea from 
C :: latex remove page number from footer 
C :: memcpy in c 
C :: c exit 
C :: how to allocate memory for pointer in c 
C :: c break statement 
C :: pid of a process in c 
C :: 2d array in c 
C :: adding a node in the front on a linked list 
C :: text to hex in C 
C :: gitlab ci heroku 
C :: Find the how many bits is turned on in a numebr 
C :: logical operators 
C :: c pointers and arrays 
C :: C/AL Convertion of Decimal to String/Text 
C :: c code to mips assembly converter online 
C :: While loop output 
C :: scranton inhabitants 
C :: Greatest common divisor iterative 
C :: unigine 
C :: pdo crud 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =