Oracle
1Z0-147 · Question #5
1Z0-147 Question #5: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-147 to reveal the answer and full explanation for question #5. The question stem and answer options stay visible for context.
Question
Examine this package:
CREATE OR REPLACE PACKAGE discounts
IS
g_id_NUMBER := 7839;
discount_rate NUMBER := 0.00;
PROCEDURE display_price (p_price NUMBER);
END discounts;
/
CREATE OR REPLACE PACKAGE BODY discounts
IS
PROCEDURE display_price (p_price NUMBER)
IS
BEGIN
DBMS_OUTPUT.PUT_LINE('discounted ' ||
TO_CHAR(p_price*NVL(discount_rate, 1)));
END display_price;
BEGIN
discount_rate := 0.10;
END discounts;
/
Which statement is true?
Options
- AThe value of DISCOUNT_RATE always remains 0.00 in a session.
- BThe value of DISCOUNT_RATE is set to 0.10 each time the package is invoked in a session.
- CThe value of DISCOUNT_RATE is set to 1.00 each time the procedure DISPLAY_PRICE is invoked.
- DThe value of DISCOUNT_RATE is set to 0.10 when the package is invoked for the first time in a session.
Unlock 1Z0-147 to see the answer
You've previewed enough free 1Z0-147 questions. Unlock 1Z0-147 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.