Pass the CIW Master CIW Enterprise Developer 1D0-437 Questions and answers with CertsForce

Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions
Questions # 31:

The filehandle INPUT is associated with the file represented by $file. Which statement will close the filehandle INPUT?

Options:

A.

close (INPUT, $file);


B.

closeINPUT;


C.

INPUT(close, $file);


D.

close(INPUT);


Expert Solution
Questions # 32:

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?

Options:

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


Expert Solution
Questions # 33:

Consider the following lines of code:

$_ = "This is a test";

s/^([^ ]*)\s*([^ ]*)/$2 $1/;

print;

What is the output of these lines of code?

Options:

A.

h Tis a test


B.

is This a test


C.

i Thiss a test


D.

his T is a test


Expert Solution
Questions # 34:

Which of the following correctly creates a SQL statement that will insert the values of the $name and $age variables into a database? The statement is assigned to the $sqlStmt variable. Assume a CHAR data type for $name and an INT data type for $age.

Options:

A.

$sqlStmt = q{INSERT INTO aTable (NAME, AGE) VALUES ($name, $age)};


B.

$sqlStmt = q{INSERT INTO aTable (NAME, AGE) VALUES ($name\, $age)};


C.

$sqlStmt = qq{INSERT INTO aTable (NAME, AGE) VALUES ($name, $age)};


D.

$sqlStmt = qq{INSERT INTO aTable (NAME, AGE) VALUES (\$name\, $age)};


Expert Solution
Questions # 35:

Which one of the following choices uses the correct syntax for a valid array assignment?

Options:

A.

@cities = Akron, Memphis, Ogden, Phoenix;


B.

@cities =~ ("Akron, Memphis");


C.

@cities =~ (Akron, Memphis, Ogden, Phoenix);


D.

@cities = ("Akron");


Expert Solution
Questions # 36:

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?

Options:

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


Expert Solution
Questions # 37:

Which one of the following statements opens a file for appending?

Options:

A.

open(PASSWD, ">/etc/passwd");


B.

open(PASSWD ">/etc/passwd");


C.

open(PASSWD, ">>/etc/passwd");


D.

open(PASSWD "+>/etc/passwd");


Expert Solution
Questions # 38:

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

Options:

A.

getpass($arg2);


B.

call &getpass($arg2);


C.

sub &getpass($arg2);


D.

call getpass($arg2);


Expert Solution
Questions # 39:

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?

Options:

A.

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


B.

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


C.

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


D.

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


Expert Solution
Questions # 40:

Which one of the following choices will replace all occurrences of the word perl with the word Perl?

Options:

A.

s/Perl/perl/I;


B.

s/"perl"/"Perl"/g;


C.

s/"perl"/"Perl"/;


D.

s/perl/Perl/g;


Expert Solution
Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions