Different Datatypes in C with Format Specifiers and Ranges

Datatypes List in C language : 

Data Type
Format Specifiers
Size
Range
Signed char
%c
1Byte
-128 to 127
Unsigned char
%c
1Byte
0-255
Int or Long int or Signed
Long Int
        %d
4 Bytes
-2147483648  to
2147483647.
Unsigned int
Or unsigned long int
%u
4 Bytes
0 to 4 Gigabyte.
Short int
%hd
2 Bytes
-32768 to 32767.
Unsigned short int
%hu
2 Bytes
0 to 65535.
float
%f
4 Bytes
3.4E-38   to 3.4E+38
double
%lf
8 Bytes
1.7E-308 to 1.7E+308
Long Double
%Lf
10 Bytes
3.4E-4932 to 1.1E+4932.

Image :

Venkatesh

Hi Guys, I am Venkatesh. I am a programmer and an Open Source enthusiast. I write about programming and technology on this blog.

You may also like...

1 Response

  1. […] Note, That we used the %s format specifier, You find the list of Format specifiers in the following article – Format Specifier in C Language. […]

Leave a Reply