Data types are used to inform which type of data we want to store or process. double is one data types is present in c. double data type is used when we want to store doubleeger data. It does not allow us to store fractional values.
Syntax declaration of the double data type variable as follows
datatype variablename;
Ex:
double number;
double id;
Size of the double is 8 bytes. It means the the memory allocated for double variable is 8 bytes. The range of the
double 2.3E-308 to 1.7E+.
We can check the size
of the data type or variable using special operator sizeof .
If we want to store more range than double there is provision in c language that is long double size is 10 bytes.
Syntax declaration of the double data type variable as follows
long datatype variablename;
Ex:
long double number;
long double id;