Question No: 7
Consider the following assignments:
$x = 9
$y = 7
$z = 5
Given these assignments, which one of the following expressions evaluates as true?
A. ($x - $y) != ($y - $z);
B. ($z * 2) <= $x;
C. ($y + $z + $x) = $y*3;
D. ($x 2) > $y;
Answer: C
Question No: 8
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?
A. The code will output the following: 100-25
B. The code will output the following: 75
C. The code will fail at line 3 because $y contains string data.
D. The code will output the following: 125
Answer: B
Question No: 9
In the context of Perl user-defined subroutines, which statement is the most accurate?
A. Variables declared using the my keyword are global in scope.
B. Variables declared using the local keyword are only available to the subroutine from which they are declared.
C. Variables declared using the my keyword are available to the calling subroutine.
D. Variable declared using the local keyword are available to subsequently called subroutines.
Answer: D
Question No: 10
Which one of the following choices will replace all occurrences of the word perl with the word Perl?
A. s/Perl/perl/I;
B. s/"perl"/"Perl"/g;
C. s/"perl"/"Perl"/;
D. s/perl/Perl/g;
Answer: D
Question No: 11
Which one of the following choices is a unary operator that can apply to only a single variable?
A. ++
B. **
C. /
D. <?>?
Answer: A
Question No: 12
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?
A. The code will output the following: 1 6 2 7 3 8 4 8 5 10 6 11
B. The code will output the following: 0 5 1 6 2 7 3 8 4 9 4 9
C. The code will output the following: 0 5 1 6 2 7 3 8 4 9 5 10
D. The code will output the following: 0 5 1 6 2 7 3 8 4 9 5 9
Answer: D
Question No: 13
Consider the following lines of code:
1.$playerStr = "Today's player is Bob Petit."; 2.if($playerStr =~ /[Ruth|Gehrig|DiMaggio]/) {
3. $game = "Baseball"; 4.}else{
5. $game = "Basketball"; 6.}
7.print $game;
What is the output of these lines of code?
A. No output is generated due to an error in line 2.
B. Basketball
C. Baseball
D. No output is generated due to an error in line 3.
Answer: C
Question No: 14
Which one of the following statements uses correct syntax and expressions?
A. do (print "Hello $a") until ($a = 10);
B. do {$a++} until {$a == $b}\;
C. do {$in = $in++} while ($in < 100);
D. do ($a++) until ($b = $a);
Answer: C
Question No: 15
Consider the following code:
$_ = "New York";
@array2 = split(//);
What is the value of $array2[0] after the code is executed?
A. ""
B. "N e w"
C. "NewYork"
D. "N"
Answer: D
Question No: 16
Consider the program code in the attached exhibit. What is the result of executing this program code?
A. The code will output the following: 20 100 Apple Grapefruit Orange
B. The code will output the following: Apple Grapefruit Orange 20 100
C. The code will output the following: 100 20 Apple Grapefruit Orange
D. The code will output the following: Orange Grapefruit Apple 100 20
Answer: B
P.S. Easily pass 1D0-437 Exam with Thedumpscentre Realistic Dumps & pdf vce, Try Free: http://www.thedumpscentre.com/1D0-437-dumps/ ( New Questions)