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 :: #![feature]` may not be used on the // stable release channel 
C :: print ascii value in c 
C :: input in c 
C :: write a program in c to check whether the number is armstrong or not 
C :: print 0 1 2 3 4 in c 
C :: nested loop in c 
C :: c round function 
C :: what is strikethrough in markdown 
C :: print bool c 
C :: function for quicksort in c 
C :: ROUNDING decimal number in C 
C :: pg_restore: error: input file appears to be a text format dump. Please use psql. 
C :: what is system function in c 
C :: matrix multiplication in c 
C :: how to print sizes of various data types of C 
C :: copy string in c 
C :: c int to char 
C :: plt legend top right outside 
C :: sqlserver insert with set identity 
C :: why there is return 0 used in c 
C :: check if pid exists c 
C :: highest common factor algorithm in c 
C :: actionbar content color in android 
C :: convert char number to int in c 
C :: binary tree count number of leaves in c 
C :: -42 c to f 
C :: c check if character is a digit or alphabet 
C :: hash function in c 
C :: getchar declaration in c 
C :: bcd to char c 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =