View the Exhibit and examine the code.
Why does the code give an error on execution?
A.
because the WORD_LIST variable is not visible in procedure wording
B.
because the lexicon variable is not visible in procedure ADD_ENTRY
C.
because the lexicon variable is not initialized in procedure wording
D.
because the WORD_LIST parameter in out mode cannot be of a record data type
Explanation:
a
A
A
A
A is the correct answer:
CREATE OR REPLACE PROCEDURE wording IS
TYPE Definition IS RECORD (
word VARCHAR2(20),
meaning VARCHAR2(200));
lexicon Definition;
PROCEDURE add_entry (word_list IN OUT Definition) IS
BEGIN
word_list.word := ‘aaaaaaaa’;
lexicon.word := ‘bbbbbbbb’;
END add_entry;
BEGIN
add_entry(lexicon);
— dbms_output.put_line(word_list.word);
dbms_output.put_line(lexicon.word);
END wording;
/
Warning: execution completed with warning
PROCEDURE wording Compiled.
13/24 PLS-00201: identifier ‘WORD_LIST.WORD’ must be declared
A is the correct answer. PLS-00201: identifier ‘WORD_LIST.WORD’ must be declared