0% found this document useful (0 votes)
6 views2 pages

C Programming

The document shows a table listing C format specifiers and their corresponding data types. It includes format specifiers like %d for decimal integers, %f for floats, %s for strings, and others along with their allowed ranges.

Uploaded by

wafulareinar256
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)
6 views2 pages

C Programming

The document shows a table listing C format specifiers and their corresponding data types. It includes format specifiers like %d for decimal integers, %f for floats, %s for strings, and others along with their allowed ranges.

Uploaded by

wafulareinar256
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/ 2

Using a table, show us all the format specifiers supported by C with

their corresponding data types.


Format Symbol Data type Range
Specifier
Name
%d or %i Decimal int -2147483648 to 2147483647
interger
%f Float float 1.2E-38 to 3.4E+38
%If Long double long 3.4E-4932 to 1.1E+4932
double
%c Character char -128 to 127
%s String char[]
%p Pointer void *
%Id Long integer signed -2147483648 to 2147483647
long
%lu Unsigned Long unsigned 0 to 4294967295
long
%lld Long Long long long -9223372036854775808 to
9223372036854775807
%llu Unsigned Long unsigned 0 to
Long long long 18446744073709551615
%x Hexadecimal unsigned 0 to 4294967295
int
%E Scientific double 2.2E-308 to 1.8E+308
notation
%o Octal unsigned 0 to 4294967295
int
%u Unsigned unsigned 0 to 4294967295
Decimal int
%hd Short short -32768 to 32767
%m Error message int
%n Output int *
assignment
%hu Unsigned unsigned 0 to 65535
Short short

You might also like