Multiple choice technology programming languages

What is the result of the query SELECT FLOOR(-4.6)+CEIL(3.9) from DUAL ?

  1. -2

  2. 0

  3. 1

  4. -1

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

FLOOR(-4.6) returns -5 (rounds down to the next lower integer), CEIL(3.9) returns 4 (rounds up to the next higher integer). The sum is -5 + 4 = -1. Remember that FLOOR on negative numbers goes to a more negative value.