exam questions

Exam 1z0-144 All Questions

View all questions & answers for the 1z0-144 exam

Exam 1z0-144 topic 1 question 12 discussion

Actual exam question from Oracle's 1z0-144
Question #: 12
Topic #: 1
[All 1z0-144 Questions]

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
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Naveen_2022
2 years, 10 months ago
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; /
upvoted 1 times
...
Naveen_2022
2 years, 10 months ago
Yes, A is correct here. Tried and tested. Errors: PROCEDURE WORDING Line/Col: 13/1 PL/SQL: Statement ignored Line/Col: 13/22 PLS-00201: identifier 'WORD_LIST.WORD' must be declared
upvoted 1 times
...
Aditya
3 years, 1 month ago
option B is wrong, as local variable can be visible inside local procedure, if they are declared before the procedure inside anonymous block.
upvoted 1 times
...
Anubhav244
4 years, 4 months ago
Yes, A is the correct answer. Explanation - the statement - DBMS_OUTPUT.PUT_LINE(word_list.word) will fail as wrod_list is a formal parameter which is visible only to the PROCEDURE add_entry
upvoted 1 times
...
nadzeya_bdc
4 years, 10 months ago
Point is missing in 'lexicone word'
upvoted 2 times
...
CosminCof
5 years, 3 months ago
more exactly word_list is a pararmeter not a variable
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...