nerdexam
CIW

1D0-437 · Question #4

1D0-437 Question #4: Real Exam Question with Answer & Explanation

The correct answer is C. The will output the following 32oz 16oz 8oz. See the full explanation below for the reasoning.

Question

Consider the following program code: %hash = ("small" -> "Boz", "medium" => "16oz", "large" => "32oz"); @keys = sort(keys(%hash)); for ($i = 0; $i < 3; $i++) { print("$hash{$keys[$i]}\n"); } What is the result of executing this program code?

Options

  • AThe code will fail at line 1 because a hash cannot contain both numeric and string data.
  • BThe code will execute without error but will output nothing.
  • CThe will output the following 32oz 16oz 8oz
  • DThe code will output the following large medium small

Community Discussion

No community discussion yet for this question.

Full 1D0-437 Practice