Sail E0 Webinar
Question

We want to round off x, a float to an int value. The correct way to do so would be


Options:
A .  y=(int)(x+0.5)
B .  y=int(x+0.5)
C .  y=(int)x+0.5
D .  y=(int)(x+0.5)
Answer: Option A



Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

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

More Questions on This Topic :

Latest Videos

Latest Test Papers