Weekend Sale - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

Consider the following lines of code:

sub mySub {

$_ = @_[1];

$a = shift;

$b = shift;

return $a * $b * $_;

}

mySub(1,2,3);

What is the output of these lines of code?

A.

No output results from this code.

B.

6

C.

2

D.

4

Consider the following program code:

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

@array = 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

Which of the following choices demonstrates the correct syntax to pass the argument $arg2 to the subroutine getpass?

A.

getpass($arg2);

B.

call &getpass($arg2);

C.

sub &getpass($arg2);

D.

call getpass($arg2);

Running your Perl scripts with a d switch will perform which task?

A.

Invoke the Perl debugger

B.

Send standard error to a file

C.

Disable breakpoints

D.

Display a stack trace

Which one of the following choices lists only valid expression operators?

A.

+ - ** //

B.

* ** / //

C.

** / ++ %

D.

*/ % -- **

Consider the program code in the attached exhibit. What is the result of executing this program code?

A.

The code will output the following:

BOBBY

B.

The code will output the following:

GERTRUDE

C.

The code will output the following:

JOHN

D.

The code will output the following:

ROBERT

Which of the following choices demonstrates the correct syntax to pass a reference to a subroutine?

A.

\@array4;

B.

@array4($ref);

C.

getpass(\@array4);

D.

getpass{@array4};

Which of the following code segments correctly readies a database query, creating a valid statement handle and a result set? Assume $dbh represents a valid database handle.

A.

$sth = $dbh->prep_statement(SELECT * FROM aTable);

$sth->execute_statement;

B.

$sth = $dbh->prepare(SELECT * FROM aTable);

$sth->execute;

C.

$sth = $dbh->prep_statement(SELECT * FROM aTable);

$sth->execute;

D.

$sth = $dbh->prepare_statement(SELECT * FROM aTable);

$sth->execute_statement;

Consider the following program code:

%color = (sun => yellow, apple => red);

reverse(%color);

@colorKeys = sort(keys(%color));

foreach(@colorKeys)

{

print($color{$_} . );

}

What is the result of executing this program code?

A.

The code will output the following:

apple sun

B.

The code will output the following:

sun apple

C.

The code will output the following:

red yellow

D.

The code will output the following:

apple red sun yellow

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");