Why is float type preferred for real quantities.

Q10. Why is float type preferred for real quantities? When should the type double be preferred over the shorter type float?

Ans. Floating-point variables represent real numbers, which are used for measurable quantities like distance, area, temperature etc. and typically have a fractional part.

Type double is used when type float is too small or insufficiently precise.

Leave a Reply

Your email address will not be published. Required fields are marked *

131 Views
%d bloggers like this: