Advertisement

Basic Discussion


ANSI C supports four classes of data types.
1. Primary or Fundamental data types.
2. User-defined data types.
3. Derived data types.
4. Empty data set.

PRIMARY DATA TYPES
Integer Types

Type                         Size (bits)                      Range
int or signed int            16                        -32,768 to 32767
unsigned int                  16                            0 to 65535
short int                         8                          -128 to 127
unsigned short int         8                                0 to 255
long int                         32      -2,147,483,648 to 2,147,483,647
unsigned long int         32                           0 to 4,294,967,295

Floating Point Types
Type                                    Size(bits)                                             Range
float                                       32                                           3.4E-38 to 3.4E+38
double                                   64                                           1.7E-308 to 1.7E+308
long double                           80                                       3.4E-4932to 1.1E+4932

Character Types

Type                                  Size (bits)                                              Range
char                                       8                                                    -128 to 127
unsigned char                      8                                                       0 to 255

No comments:

Post a Comment

Please comment bellow. Share your knowledge