The correct way to round off a non-negative floating number x to an integer…
PYQ UGC NET 2013Modified — slightly modified from the official paper; see the solution
The correct way to round off a non-negative floating number x to an integer value is
- A.
y = (int) (x + 0.5)
- B.
y = int (x + 0.5)
- C.
y = (int) x + 0.5
- D.
y = (int) ((int)x + 0.5)
Attempted by 1356 students.
Sign up free to check your answer
Sign up freeLoading lesson…

