Multiple choice general knowledge

In MATLAB, floor(5.3) gives an output of

  1. 6

  2. 5

  3. 5.0001

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The floor function rounds toward negative infinity. floor(5.3) = 5 because it moves to the nearest integer less than or equal to 5.3. Option A (6) would be ceil(5.3). Option C is wrong because floor returns an integer, not a decimal approximation.