Labour Day Special - Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: top65certs

CIW 1D0-437 Online Access

Page: 2 / 6
Total 169 questions

CIW PERL FUNDAMENTALS Questions and Answers

Question 5

Which one of the following while statements uses correct syntax and expressions?

Options:

A.

while {0} (print "OK");

B.

while ($c != 99) {print "OK"}

C.

while {$b eq "OK"} (print "$a++");

D.

while ($_) Do {print "OK");

Question 6

Consider the following program code:

@array = ("Y", "W", "X");

@array = sort(@array);

unshift(@array, "Z");

print(@array[0]);

What is the output of this code?

Options:

A.

W

B.

X

C.

Y

D.

Z

Question 7

Consider the following program code:

@array = ("ALPHA", "beta", "GaMmA");

@array = sort(@array);

print("@array");

What is the output of this code?

Options:

A.

beta GaMmA ALPHA

B.

ALPHA GaMmA beta

C.

ALPHA beta GaMmA

D.

beta ALPHA GaMmA

Question 8

Consider that a file named test.txt contains this 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: $!");

seek(OUT, 15, 0);

read(OUT, $buffer, 5);

print $buffer . "\n";

print tell(OUT);

Options:

A.

t text

20

B.

t tex

19

C.

t text

19

D.

t tex

20

Page: 2 / 6
Total 169 questions