Free 1D0-437 Exam Braindumps (page: 6)

Page 5 of 25

Consider the following program code
$y - "1";
$x = "2";
$z = "3";
do
{

print ("$y ");
} while ($y eq "2");
do
{
print ("$x ");
} until ($x eq "2");
print ("$z ");
What is the result of executing this program code?

  1. The code will output the following
    1 2 3
  2. The code will output the following
  3. The code will output the following
    3 2
  4. The code will output the following
    3 2 1

Answer(s): A



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?

  1. The code will fail at line 1 because a hash cannot contain both numeric and string data.
  2. The code will execute without error but will output nothing.
  3. The will output the following 32oz 16oz 8oz
  4. The code will output the following large medium small

Answer(s): C



Which of the following choices demonstrates the correct syntax to pass a reference to a subroutine?

  1. \@array4;
  2. @array4($ref);
  3. getpass(\@array4);
  4. getpass{@array4};

Answer(s): C



Consider the following program code
$x - 0;
$y = 5;
do
{
print ("$x $y ");
) while (++$x < 5 && ++$y < 10);

print ("$x $y ");
What is the result of executing this program code?

  1. The code will output the following
    1 6 2 7 3 8 4 8 5 10 6 11
  2. The code will output the following
    0 5 1 6 2 7 3 8 4 9 4 9
  3. The code will output the following
    0 5 1 6 2 7 3 8 4 9 5 10
  4. The code will output the following
    0 5 1 6 2 7 3 8 4 9 5 9

Answer(s): D






Post your Comments and Discuss CIW 1D0-437 exam with other Community members:

1D0-437 Discussions & Posts