Hi Guest 1 HomePage 1 Jobs 1 WalkIn 1Articles  

 :) Latest Topic
Introduction to C
History of C Language
C Variables
Variables Types in C
C Identifiers
C Operators
C Comments
ASCII Value C
Constants C
Features of C
Install C Language
Start C Program
Compilation in c
printf() and scanf()
C Data Types
C Keyword
Format Specifier C
Format Specifier part2
Escape Sequence C
Tokens in C
Boolean in C
What are literals?
 


  

 
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


Format Specifier %E
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


Format Specifier %g
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


Format Specifier %p
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


Format Specifier %c
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


Format Specifier %s
In above code this will print value as string.
Output:-
CrackYourInterview


(12)Minimum Field Width Specifier


Format Specifier Space
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


Format Specifier SpaceFill
In above code we will fill empty space with some other characters
Output:-
000000012


(14)Use of (Dot) operator


Format Specifier Dot
In above code we use dot operator with code
Output:-
12.20





Other Important Questions
Features of C
Introduction to C
History of C Language
Install C Language
C Variables







 
Top Searches:asp net questions vb net questions sql query uddl questions class javascript Questions sharepoint interview questions and concept silverlight questions and concept wcf questions beans general knowledge ajax questions
PHP | Biztalk | Testing | SAP | HR |