More about Data Types

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).

Data TypeSizeRange
int4 bytes–2,147,483,648 to 2,147,483,647
char1 byte–128 to 127
float4 bytes3.4 e-38 to 3.4 e+38 (7 digits precision)
double4 bytes1.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

 
Template designed using TrixTG