1. What are floating point numbers ? When are they preferred over integers ?

A number having fractional part is a floating point number. e.g. 3.14 They are preferred over integers when we have to represent values between the integers with more precision.