Home > General Studies (Hindi) > Quizzes > CIW Perl Specialist Exam 1D0-437 - Practice Test 2
CIW Perl Specialist Exam 1D0-437 - Practice Test 2
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 7% Most missed: “Which one of the following choices lists the three loop-control commands?”
CIW Perl Specialist Exam 1D0-437 - Practice Test 2
Time left 00:00
25 Questions

1. Running your Perl scripts with a d switch will perform which task?
2. Which of the following choices demonstrates the correct syntax to pass a reference to a subroutine?
3. Which one of the following while statements uses correct syntax and expressions?
4. Consider the following expression $modresult -33 % 11; What is the value of $modresult in the expression?
5. Which one of the following statements opens a file for appending?
6. Consider the following assignments $x = 9 $y = 7 $z = 5 Given these assignments, which of the following expressions evaluates as true?
7. Consider the following program code package Dog; $string = Walk the dog."; if($string eq "Walk the dog.") { package Cat; $string = "Pet the cat."; print("$string\n"); } print ("$string\n"); What is the result of executing this program code?"
8. Which of the following methods of calling a subroutine is not valid?
9. 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?"
10. Consider the following program code: %_Nifty = (one, two, three, four); @NiftyKeys = sort(keys(%_Nifty)); foreach(@NiftyKeys) { print ($_Nifty{$_} . ); } What is the result of executing this program code?
11. Consider the program code in the attached exhibit. What is the result of executing this program code?
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?"
13. Consider the following program code: %hash = (small => 8oz, 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?
14. Consider the following lines of code: $_ = This is a test"; s/^([^ ]*)\s*([^ ]*)/$2 $1/; print; What is the output of these lines of code?"
15. Consider the following program code: @arrayA = (10, 20, 30); @arrayB = @arrayA; $arrayB[1] = 40; print $arrayA[1]; What is the output of this code?
16. Which of the following correctly creates a SQL statement that will insert the values of the $name and $age variables into a database? The statement is assigned to the $sqlStmt variable. Assume a CHAR data type for $name and an INT data type for $age.
17. Which one of the following statements uses correct syntax and expressions?
18. Which statement is the most accurate?
19. Karl wants to define a character class that includes any alphanumeric word characters. Which of the following choices is best suited for this requirement?
20. Which keyword indicates an object reference rather than a variable reference?
21. Which one of the following choices lists only valid expression operators?
22. Consider the following program code print(1 "); BEGIN { print ("2 "); } END { print ("3 "); } BEGIN { print ("4 ") } END { package MyPackage; print ("5 "); } What is the result of executing this program code"
23. Which one of the following choices is a unary operator that can apply to only a single variable?
24. 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?"
25. Consider the following statement: for ($count=0; $count < 5; $count++) {print $count "} What will be the output from the given statement?"