1D0-437 Premium Bundle

1D0-437 Premium Bundle

CIW PERL FUNDAMENTALS Certification Exam

4.5 
(41160 ratings)
0 QuestionsPractice Tests
0 PDFPrint version
November 21, 2024Last update

CIW 1D0-437 Free Practice Questions

New CIW 1D0-437 Exam Dumps Collection (Question 7 - Question 16)

Q7. 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);

A. t text 20

B. t tex 19

C. t text 19

D. t tex 20

Answer: D


Q8. 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


Q9. Consider the following program code:

$y = 1;

$x = 2;

$z = 3;

do

{

print ($y );

} while ($y eq 2);

do

{

print ($x );

} until ($x eq 2); print ($z );

What is the result of executing this program code?

A. The code will output the following: 1 2 3

B. The code will output the following: 3

C. The code will output the following: 2 3

D. The code will output the following: 3 2 1

Answer: A


Q10. Consider the following lines of code:

sub mySub { (

$arg, @args) = @_; foreach $val (@args) {

$returnVal .= "$arg, $val\n";

}

$returnVal . "" . @args;

}

print &mySub(1, "a value", "another value", "a parameter", "another parameter");

What is the output of these lines of code?

A. 1, a value 1, another value 1, a parameter 1, another parameter 4

B. 1, a value 1, another value 1, a parameter 1, another parameter a valueanother valuea parameteranother parameter

C. 1, a value, another value, a parameter, another parameter a value another value a parameter another parameter

D. 1, a value, another value, a parameter, another parameter 4

Answer: A


Q11. Consider the following program code:

$x = 10;

LOOP: while ($x < 15)

{

print ($x );

if ($x >= 14 && $x <= 20)

{

$x += 2; redo LOOP;

}

else

{

$x++;

}

}

What is the result of executing this program code?

A. The code will output the following: 11 12 13 14 15 16 17 18 19

B. The code will output the following: 10 11 12 13 14 16 18 20 22

C. The code will output the following: 10 11 12 13 14 16 18 20

D. The code will output the following: 10 11 12 13 14 15 16 17 18 19 20

Answer: B


Q12. Consider the following program code:

$var = 10; package Alpha;

$var = 20;

{

package Beta;

$var = 30;

}

package Gamma;

$var = 40;

{

print $var;

}

What is the output of this code?

A. 10

B. 20

C. 30

D. 40

Answer: D


Q13. Consider the following program code:

%employees = ("Lucy", "Accounting", "Armando", "Finance", "Adrienne", "Marketing");

delete($employees{"Lucy"});

Which of the following lines of code has the same effect as the preceding code?

A. %employees = ("Adrienne", "Marketing");

B. %employees = ("Lucy", "Accounting");

C. %employees = ("Lucy", "Accounting", "Armando", "Finance");

D. %employees = ("Armando", "Finance", "Adrienne", "Marketing");

Answer: D


Q14. Consider the following program code:

1.$x = 100;

2.$y = "-25";

3.$sum = $x + $y; 4.

5.print $sum;

What is the result of executing this program code?

A. The code will output the following: 100-25

B. The code will output the following: 75

C. The code will fail at line 3 because $y contains string data.

D. The code will output the following: 125

Answer: B


Q15. Consider the following program code:

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

print("@array");

What is the output of this code?

A. beta GaMmA ALPHA

B. ALPHA GaMmA beta

C. ALPHA beta GaMmA

D. beta ALPHA GaMmA

Answer: C


Q16. 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?

A. The code will output the following: 1 2 3 4

B. The code will output the following: 1 3 4

C. The code will output the following: 1 3 5

D. The code will output the following: 1 2 3 4 5

Answer: A


100% Latest CIW 1D0-437 Questions & Answers shared by Thedumpscentre, Get HERE: http://www.thedumpscentre.com/1D0-437-dumps/ (New Q&As)


START 1D0-437 EXAM