CIW Perl Specialist 1D0-437 Exam Practice Test

Page: 1 / 14
Total 169 questions
Question 1

Consider the following program code:

1.$x = 100;

2.$y = "-25";

3.$sum = $x + $y;

4.

5.print $sum;

What is the result of executing this program code?



Answer : B


Question 2

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


Question 3

Consider the following program code:

1.$x = 100;

2.$y = 15;

3.$result = $x % $y;

4.

5.print$result;

What is the result of executing this program code?



Answer : C


Question 4

Consider the following program code:

$x = 5;

$y = 10;

while(++$x < 10 && ++$y < 15)

{

print ($x $y );

}

print ($x $y );

What is the result of executing this program code?



Answer : B


Question 5

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 6

Which of the following choices demonstrates the correct syntax to pass the argument $arg2 to the subroutine getpass?



Answer : A


Question 7

Consider the following package definition package Convert;

Which one of the following statements should immediately follow the given package definition to create a valid module?



Answer : A


Page:    1 / 14   
Total 169 questions