C Programming :: Variables & Data Types - Discussion
Home > C Programming > Variables & Data Types > MCQs Questions Discussion
36 / 51
When a variable of data type double is converted into float, then
Arounding takes place
Btruncation takes place
Cthe lower order bits are dropped
Dnone of these
Answer: Option (Login/Signup)
Show Explanation
Hence, converting from double to float will give you the closest possible, or you can say rounding-off takes place.
Asked In ::
STEP-BY-STEP
float and double don't store decimal places, rather they store binary places. Assuming IEEE 754, float is 24 significant bits(7.22 decimal digits), and double is 53 significant bits(15.95 decimal digits).
Hence, converting from double to float will give you the closest possible, or you can say rounding-off takes place.
Read Full Answer
Report Error
Please Login First Click Here