For the reasons stated here, there should be some data type range that every system should have. Depending on the sytem/compiler you are working on, these range of data types can vary. So don't worry if you see different results in your computer (I will give and explain a program later to see what is the range of data type that your computer can store).
There are variations of primitive data types such as signed and unsigned char, signed and unsigned int, short and long int, signed and unsigned long int,
Note : 1 byte = 8 bits
Data Type | Size | Range |
---|---|---|
int | 4 bytes | –2,147,483,648 to 2,147,483,647 |
char | 1 byte | –128 to 127 |
float | 4 bytes | 3.4 e-38 to 3.4 e+38 (7 digits precision) |
double | 4 bytes | 1.7e-308 to 1.7e+308 (15 digits precision) |
There are variations of primitive data types such as signed and unsigned char, signed and unsigned int, short and long int, signed and unsigned long int,
Note : 1 byte = 8 bits
0 comments:
Post a Comment