| 
 
 
 |  | | 
 | 
 | Format Specifier part2 Question Posted on 24 Aug 2020
 
 Home >> Tutorial >> C Language >> Format Specifier part2
 | 
 
 
 | Format Specifier part2 As in part one i have specified format specifier with some example and below are the left part for format specifier
 (7)Use of %E in C program
 
 
 
   In above code output will be exponent part will be print and Exponentila is with capital E
 Output:-
 Exponential value of y is: 3.000000E+00
 
 
 (8)Use of %g in C program
 
 
 
   In above code float value of y is display by using %g specifier. And %g will display the output same as the input with same precision.
 Output:-
 Float value of y is: 3.8
 
 
 (9)Use of %p in C program
 
 
 
   In above code this will produce the hexadecimal form of some values
 Output:-
 Address value of y in hexadecimal form is: 0x7ffeb01a53ec
 
 
 (10)Use of %c in C program
 
 
 
   In above code this will print value that convert int value of char to ascii character.
 Output:-
 Value of a is: c
 
 
 (11)Use of %s in C program
 
 
 
   In above code this will print value as string.
 Output:-
 CrackYourInterview
 
 
 (12)Minimum Field Width Specifier
 
 
 
   In above code we use "%8d" specifier displays the value after 8 spaces while %-8d specifier will make a value left-aligned.
 Output:-
 900
 900
 
 
 (13)Field Empty Space
 
 
 
   In above code we will fill empty space with some other characters
 Output:-
 000000012
 
 
 (14)Use of (Dot) operator
 
 
 
   In above code we use dot operator with code
 Output:-
 12.20
 |  | 
 
 
 
 
 
 
 
 
 
 
 
 
 |  |  |  | 
 |