C Numeric Data Types : Data Type « Data Type « C Tutorial






Keyword           Variable Type               Range

char              Character (or string)       -128 to 127
int               Integer                     -32,768 to 32,767
short             Short integer               -32,768 to 32,767
short int         Short integer               -32,768 to 32,767
long              Long integer                -2,147,483,648 to 2,147,483,647
unsigned char     Unsigned character          0 to 255
unsigned int      Unsigned integer            0 to 65,535
unsigned short    Unsigned short integer      0 to 65,535
unsigned long     Unsigned long integer       0 to 4,294,967,295
float             Single-precision            +/-3.4E10^38 to +/-3.4E10^38
                  floating-point
                  (accurate to 7 digits)     
double            Double-precision            +/-1.7E10^308 to +/-1.7E10^308 
                  floating-point
                  (accurate to 15 digits)

C has really only four types of variables:

  1. char
  2. int
  3. float
  4. double








2.1.Data Type
2.1.1.What is a data type
2.1.2.Introduction to Data Types
2.1.3.C Numeric Data Types
2.1.4.Use unsigned variables
2.1.5.Signed and Unsigned Variables
2.1.6.Get maximum and minimum values of data type
2.1.7.Multiple declarations