CIW Perl Specialist 1D0-437 Exam Practice Test

Page: 1 / 14
Total 169 questions
Question 1

Consider the following program code:

@arrayA = (10, 20, 30);

@arrayB = @arrayA;

$arrayB[1] = 40;

print $arrayA[1];

What is the output of this code?



Answer : B


Question 2

Which one of the following while statements uses correct syntax and expressions?



Answer : B


Question 3

Karl wants to define a character class that includes any alphanumeric word characters. Which of the following choices is best suited for this requirement?



Answer : A


Question 4

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?



Answer : C


Question 5

Consider the following program code:

@array = ("ALPHA", "beta", "GaMmA");

@array = sort(@array);

print("@array");

What is the output of this code?



Answer : B


Question 6

Consider the following program code:

$var = 10;

package Alpha;

$var = 20;

{

package Beta;

$var = 30;

}

package Gamma;

$var = 40;

{

print $var;

}

What is the output of this code?



Answer : D


Question 7

Consider the following program code:

$x = 150;

$y = "250";

if (($x + 100) == $y) { print("1 "); }

if ("250" == $y) { print("2 "); }

if ("250" eq $y) { print("3 "); }

if ($x lt $y) { print("4 "); }

if ($x ge $y) { print("5 "); }

What is the result of executing this program code?



Answer : A


Page:    1 / 14   
Total 169 questions