Exam1pass
Easiest way to pass IT exams
Exam1pass Help You Pass Any IT Exam
http://www.exam1pass.com
Exam : CIW 1D0-437
Title
: CIW PERL
FUNDAMENTALS
Version : Demo
Exam1pass
Easiest way to pass IT exams
Exam1pass Help You Pass Any IT Exam
http://www.exam1pass.com
1. Consider the following statement:
$buffer = a string;
Also consider that a file named test.txt contains the following line of text:
One line of test text.
What is the output of the following lines of code?
$file = "test.txt";
open (OUT, "<$file") || (die "cannot open $file: $!");
read(OUT, $buffer, 15, 4);
print $buffer;
A. a strOne line of test
B. a stOne line of tes
C. a strOne line of tes
D. a stOne line of test
Answer: B
2. Consider the following lines of code:
@array1 = ("apples", "oranges", "pears", "plums");
foreach (@array1) {print "$_\n"};
What is the result of these lines of code?
A. applesorangespearsplums
B. apples oranges pears plums
C. apples
D. apples
oranges
pears
plums
Answer: D
3. Consider the following program code:
%hash = (small => 8oz,
Exam1pass
Easiest way to pass IT exams
Exam1pass Help You Pass Any IT Exam
http://www.exam1pass.com
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?
A. The code will fail at line 1 because a hash cannot contain both numeric and string data.
B. The code will execute without error but will output nothing.
C. The code will output the following:
32oz
16oz
8oz
D. The code will output the following:
large
medium
small
Answer: C
4. 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
5. Consider the following program code:
@array = (10, Masami, 10..13, Niklas);
for ($i = 1; $i < $#array; $i++)
{
Exam1pass
Easiest way to pass IT exams
Exam1pass Help You Pass Any IT Exam
http://www.exam1pass.com
print($array[$i] );
}
What is the result of e