Data types

Sunday, 14 August 2016

Data types:

  • Datatype is defined as what type of value that variable can hold.
              int a; --------------------> a is a variable of type int.
           
Type
      size
Range
Ctrl string
Signed char
1 byte
-128 to 127
%c
unsigned char
1 byte
0 to 255
%c
Signed int
2 bytes
-32768 to +32767
%d
unSigned int
2 bytes
0 to 65535
%u
Short int
1 byte
-128 to 127
%d
Unsigned shortint
1 byte
0 to 255
%d
Longint
4 bytes
-2147483648 to 2147483647
%ld
Unsignedlong int
4 bytes
0 to 4294967295
%lu
Float
4 bytes
3.4*10-38  to 3.4*1038
%f
double
8 bytes
1.7*10-308  to 1.7*10308
%lf
longdouble
1 0bytes
3.4*10-4932 to 3.4*104932
%lf


You can also refer
----------------------------------------------------------------------------------------------------------






No comments:

Post a Comment