Here the correct way to round of the float values are :
whenever, a decimal value of x <5 the ans would be the floor value of x .
and when decimal value of x >5 the ans would be the ceil value of x.
for eg.
if x=5.75 , the correct round off value will be 6. i.e y=6.:
so here (int)(5.75+0.5) = (int) (6.25) = 6.
and if x=5.25 ,the correct round off value will be 5. i.e y=5.:
so here (int)(5.25+0.5) = (int) (5.75) = 5
so adding 0.5 in x and returning floor value will return the correct round off value . which is equivalent to OPTION "A" i.e (int )(x+0.5) Here Type casting int means give the floor value of x+0.5 which is what we want in the answer
hence Option "A" is correct.