when an integer is divided by a float, what will be the data type of resulting answer. for example a=17 and b=20.0 . ans=17/20.0 . What will be the answer in this case. '0' or '0.85?
What type is the variable to which the answer will be assigned? The compiler will do some automatic type conversion to make sure it gets the proper type assigned to it. Or you could typecast variables on the right side of the equation as needed to ensure the conversions are done like you want them to be done.