Explanation:
double data type contains: 8 bytes
long data type contains: 8 bytes
We can convert double to a long using Type casting.
When we want to convert from one data type to another data type we use Type Casting. For example, if we want to store a lengthy value(double,long) in a integer, we can type int (data type)Variable . Using the cast operator, you can explicitly convert values from one type to another. In c language, there are two kinds of type casting that are Implicit conversions and Explicit Conversions.
Example-
double x = callingFunction();
// Now typecast
ing
long y = (long) x;