Sail E0 Webinar
Question

What will you do to treat the constant 3.14 as a float?


Options:
A .  use float(3.14f)
B .  use 3.14f
C .  use f(3.14)
D .  use (f)(3.14)
Answer: Option B

Given 3.14 is a double constant.
To specify 3.14 as float, we have to add f to the 3.14. (i.e 3.14f)


Was this answer helpful ?
Next Question

Submit Solution

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

Latest Videos

Latest Test Papers