Question No: 3
Which statement writes data to the filehandle OUTPUT?
A. print "Here's my data.\n" > OUTPUT
B. write OUTPUT "Here's my data.\n";
C. write OUTPUT ">Here's my data.\n";
D. print OUTPUT "Here's my data.\n";
Answer: D
Question No: 4
Consider the following program code:
$Animal = Dogs bark; package Cat;
$Animal = Cats purr;
{
package Fish;
$Animal = Fish swim;
} p
ackage 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 No: 5
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: 6
Which statement is the most accurate?
A. The unshift function removes elements from the beginning of an array.
B. The unshift function adds elements to the end of an array.
C. The shift function adds elements to the end of an array.
D. The shift function removes elements from the beginning of an array.
Answer: D
Question No: 7
Consider the following program code:
if ("Apple" gt "Pear")
{
print("True ");
}
else
{
print("False ");
}
if ("Banana" le "Banana")
{
print("True ");
}
else
{
print("False ");
}
What is the result of executing this program code?
A. False False
B. False True
C. True False
D. True True
Answer: B
Question No: 8
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: 9
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 No: 10
Which one of the following statements opens a file for appending?
A. open(PASSWD, ">/etc/passwd");
B. open(PASSWD ">/etc/passwd");
C. open(PASSWD, ">>/etc/passwd");
D. open(PASSWD "+>/etc/passwd");
Answer: C
Question No: 11
Consider the following lines of code:
$_ = "This is a test"; s/^([^ ]*)\s*([^ ]*)/$2 $1/; print;
What is the output of these lines of code?
A. h Tis a test
B. is This a test
C. i Thiss a test
D. his T is a test
Answer: B
Question No: 12
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
100% Replace CIW 1D0-437 Questions & Answers shared by Certifytools, Get HERE: https://www.certifytools.com/1D0-437-exam.html (New Q&As)