Friday 17 August 2012

Ranges of Data types in Language C



          Integers contain 32 bits (four bytes). Signed integers are represented in two's-complement form. The most-significant bit holds the sign: 1 for negative, 0 for positive and zero. The ranges of these  are listed below:


 TYPE                                                                        RANGE

unsigned short                                                                                 0 to 65535
Signed Short                                                                                    -32768 to 32767
Unsigned Long                                                                                 0 to 4294967295
Signed long                                                                                     -2147483648 to 2147483647

No comments:

Post a Comment