exam questions

Exam 1z0-148 All Questions

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

Exam 1z0-148 topic 1 question 73 discussion

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

Which two PL/SQL blocks give the output "this is a test message"?

  • A. BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME (this is a test message, TRUE)); END;
  • B. BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME (‘this is a " "test" " message’, TRUE)); END;
  • C. BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME (‘ "this is a "test" message" ’, TRUE)); END;
  • D. BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME (‘ "this is a test message" ’, TRUE)); END;
  • E. BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME (this is a test message , FALSE));
Show Suggested Answer Hide Answer
Suggested Answer: AC 🗳️

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
chrishillinger
2 years, 9 months ago
Selected Answer: DE
DE is correct
upvoted 1 times
...
Anubhav244
4 years, 4 months ago
The Second Parameter (TRUE/FALSE) is for uppercase(TRUE) and lower case (FALSE).. however when the string is quoted between double quotes and is in lower case it is still displayed in lower case when the parameter is TRUE. Rectified Option D&E D. SET SERVEROUTPUT ON; BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME ('this is a test message' , FALSE)); END; E. SET SERVEROUTPUT ON; BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME ('"this is a test message"', TRUE)); END;
upvoted 3 times
...
gusa
4 years, 9 months ago
set serveroutput on declare BEGIN --a : ok DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME ('this is a test message', TRUE)); --b : error --DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME ('this is a " "test" " message', TRUE)); --c: error --DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME ('"this is a "test" message"', TRUE)); --d ok: DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME ('"this is a test message" ', TRUE)); --e : ok DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME ('this is a test message' , FALSE)); end; REsult: "THIS IS A TEST MESSAGE" "this is a test message" "this is a test message" then: the correct answer is D,E
upvoted 3 times
CosminCof
4 years, 7 months ago
yes D and E
upvoted 1 times
...
...
Resmi
4 years, 11 months ago
This question has some typo.. the correct options as seen on another source is given below: D is actually: BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME ('"this is a test message"',TRUE));END; and E is: BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME ('this is a test message',FALSE));END; Both gives output as "this is a test message".
upvoted 2 times
...
Adela_bg
4 years, 11 months ago
BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME (‘this is a test message ’, FALSE)); END; BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME (‘ “this is a test message” ’, TRUE)); END;
upvoted 2 times
...
tassicek
5 years, 3 months ago
here is a big typo i think ... in C and D is the same and is there space between ' and " ... dbms_assert fail. :(
upvoted 1 times
...
yurijk
5 years, 4 months ago
Propably answers has typos. Two methods that I found to print this output are: BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME('this is a test message', FALSE)); END; BEGIN DBMS_OUTPUT.PUT_LINE (DBMS_ASSERT.ENQUOTE_NAME('"this is a test message"', FALSE)); END;
upvoted 1 times
...
orakell
5 years, 6 months ago
D, not C. The Boolean indicates whether the output should be capitalized (true) or not (false), so it looks like something else may be wrong with this question.
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 ...