QUESTION 11
Consider the following program code:
$Animal – “Dogs bark”;
package Cat;
$Animal = “Cats purr”;
{
package Fish;
$Animal – “Fish swim”;
}
package main;
print $Animal;
What is the result of executing this program code?
A. The code will fail at line 4.
B. The code will output the following Dogs bark
C. The code will output the following Cats purr
D. The code will output the following Fish swim
Answer: B
QUESTION 12
Which statement will print the capital attribute of the $kansas object?
A. print (“capital”=>$kansas);
B. print {$kansas}=>(capital);
C. print (capital)<={$kansas};
D. print $kansas->{“capital”};
Answer: D
QUESTION 13
Consider the program code in the attached exhibit. What is the result of executing this program code?
Image may be NSFW.
Clik here to view.
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
QUESTION 14
Which statement will open the /etc/passwd file for reading only?
A. open(PASSFILE “+>/etc/passwd”);
B. open(PASSFILE, “/etc/passwd”);
C. open(PASSFILE “+</etc/passwd”);
D. open(PASSFILE, “>/etc/passwd”);
Answer: B
QUESTION 15
Consider the following expression $modresult – 33 % 11; What is the value of $modresult in the expression?
A. 1
B. 3
C. 0
D. -3
Answer: C
QUESTION 16
Consider the following program code:
@array – (1..5);
print(shift(@array) . ” “);
print(shift(@array) . ” “);
print(pop(@array) . ” “);
print(pop(@array( . ” “);
push(@array, “SIX”);
print(shift(@array) . ” “);
print(shift(@array) . ” “);
What is the result of executing this program code?
A. The code will output the following
1 2 5 4 SIX 3
B. The code will output the following
5 4 1 2 3 SIX
C. The code will output the following
1 2 5 4 3 SIX
D. The code will output the following
5 4 1 2 SIX 3
Answer: C
QUESTION 17
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 18
Which one of the following choices will replace all occurrences of the word perl with the word Perl?
A. s/Perl/perl/l;
B. s/”perl”/Perl”/g;
C. s/”perl”/”Perl”/;
D. s/perl/Perl/g;
Answer: D
QUESTION 19
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?
A. The code will output the following
Pet the cat.
Pet the cat.
B. The code will output the following
Walk the dog.
Walk the dog.
C. The code will output the following
Pet the cat.
Walk the dog.
D. The code will output the following
Walk the dog.
Pet the cat.
Answer: C
QUESTION 20
Consider the following code block:
BEGIN {print (“Jan “);}
BEGIN {print (“Feb “);}
END {print (“Mar “);}
END {print (“Apr “);}
Print (“May “);
What is the result of this code block?
A. Jan Feb May Apr Mar
B. Jan Feb Mar Apr May
C. Mar Apr May Jan Feb
D. May Jan Feb Mar Apr
Answer: A
If you want to pass CIW 1D0-437 exam successfully, donot missing to read latest lead2pass CIW 1D0-437 dumps.
If you can master all lead2pass questions you will able to pass 100% guaranteed.