exam questions

Exam 1z0-144 All Questions

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

Exam 1z0-144 topic 1 question 37 discussion

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

Examine the following code:

Which statement is true about the execution of the above code?

  • A. It executes and displays null.
  • B. It executes and the condition returns true.
  • C. It executes and control goes to the else statement.
  • D. It fails because no value is assigned to the v_myage variable.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
C is correct. Null value will always goes to 'ELSE' part. You can avoid thus by adding NVL.
upvoted 2 times
...
HexaDev
4 years, 10 months ago
A is correct answer, because condition v_myage <11 will be FALSE, and control will go to ELSE statement and output value.
upvoted 1 times
Anubhav244
4 years, 4 months ago
The option you are saying is C
upvoted 2 times
...
Koczis
3 years, 2 months ago
You compare null with value.It will be ignored that's why else will be processed
upvoted 1 times
...
...
CosminCof
5 years, 3 months ago
why is not D, can you compare a null value with a data type ?
upvoted 2 times
Aditya
3 years, 1 month ago
If condition v_myage < 11 is NOT true, (i.e. ELSE or NULL), then control will go to ELSE clause. At this time, variable v_myage is holdng NULL value. So, above condition is NOT true, and control will move to ELSE part.
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 ...