0% found this document useful (0 votes)
332 views1 page

Format Specifier Description Supported Data Types: Annexure - A

The document describes various format specifiers in C and their supported data types. The format specifiers include %c for characters, %d for signed integers, %e and %E for scientific notation of floats, %f for floating point values, %g and %G for floats and doubles similarly to %e/%E, and others for integers, strings, pointers, and hexadecimal values. Each format specifier lists the data types it supports for printing values with that format.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
332 views1 page

Format Specifier Description Supported Data Types: Annexure - A

The document describes various format specifiers in C and their supported data types. The format specifiers include %c for characters, %d for signed integers, %e and %E for scientific notation of floats, %f for floating point values, %g and %G for floats and doubles similarly to %e/%E, and others for integers, strings, pointers, and hexadecimal values. Each format specifier lists the data types it supports for printing values with that format.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Annexure – A

Format specifier in C

Format Description Supported data types


specifier
%c Character 1. char
2. unsigned char
%d Signed Integer 1. short
2. unsigned short
3. int
4. long
%e or %E Scientific notation of float values 1. float
2. double
%f Floating point 1. float
%g or %G Similar as %e or %E 1. float
2. double
%hi Signed Integer(Short) 1. short
%hu Unsigned Integer(Short) 2. unsigned short
%i Signed Integer 1. short
2. unsigned short
3. int
4. long
%l or %ld or Signed Integer 1. long
%li
%lf Floating point 1. double
%Lf Floating point 1. long double
%lu Unsigned integer 1. unsigned int
2. unsigned long
%lli, %lld Signed Integer 1. long long
%llu Unsigned Integer 1. unsigned long long
%o Octal representation of Integer. 1. short
2. unsigned short
3. int
4. unsigned int
5. long
%p Address of pointer to void void * 1. void *
%s String 1. char *
%u Unsigned Integer 1. unsigned int
2. unsigned long
%x or %X Hexadecimal representation of 1. Short
Unsigned Integer 2. unsigned short
3. int
4. unsigned int
5. long
%n Prints nothing
%% Prints % character

You might also like