Question 1
Which query returns exactly the character string `0.08`?
A. SELECT TO_CHAR(0.075, 'FM9.99') FROM DUAL
Treats '9' and '0' as interchangeable in the integer position: the value rounds to 0.08, but a '9' element is left blank when its digit is a leading zero, so the result is .08 with no leading 0.
B. SELECT TO_CHAR(0.075, 'FM0.0') FROM DUAL
Assumes the mask does not drive rounding: with a single decimal place the value is rounded to one decimal, so 0.075 becomes 0.1, not 0.08.
C. SELECT TO_CHAR(0.075, 'FM0.00') FROM DUALCorrect answer
The value is rounded to the two decimal places in the mask (half away from zero), so 0.075 becomes 0.08; the '0' in the integer position forces the leading zero to appear, and FM only removes padding blanks, so the result is exactly 0.08.
D. SELECT TO_CHAR(0.075, 'FM0.000') FROM DUAL
Assumes FM trims to two decimals: three decimal places preserve the value in full as 0.075, and FM does not strip a significant trailing digit.
Explanation
TO_CHAR rounds a number to the count of digits that follow the decimal point in the format model, so the number of decimal places in the mask determines the value produced. A '0' element forces a digit to appear (including a leading zero), whereas a '9' element is blank when that position holds a leading zero. FM removes only padding blanks and does not trim digits that a '0' element or the value itself requires.