Why does the code give an error on execution?

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

Download Printable PDF. VALID exam to help you PASS.

One thought on “Why does the code give an error on execution?

  1. I also think that correct answer is A, which is confirmed by executing above code:

    set serveroutput on;
    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:=’aardvark’;
    lexicon.word:=’aardwolf’;
    end add_entry;
    begin
    add_entry(lexicon);
    dbms_output.put_line(word_list.word);
    dbms_output.put_line(lexicon.word);
    end wording;
    /

    Warning: Procedure created with compilation errors.

    SQL> show err;
    Errors for PROCEDURE WORDING:

    LINE/COL ERROR
    ——– —————————————————————–
    13/3 PL/SQL: Statement ignored
    13/24 PLS-00201: identifier ‘WORD_LIST.WORD’ must be declared

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.