Which one of the following while statements uses correct syntax and expressions?
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?
Consider the following program code:
%_Nifty = (one, two, three, four);
@NiftyKeys = sort(keys(%_Nifty));
foreach(@NiftyKeys)
{
print ($_Nifty{$_} . );
}
What is the result of executing this program code?
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?
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?
Consider the following assignments:
$x = 9
$y = 7
$z = 5
Given these assignments, which one of the following expressions evaluates as true?
Consider the following program code:
package Dog;
$string = Walk the dog.;
if($string eq Walk the dog.)
{
package Cat;
$string = Pet the cat.;
print($string\n);
}
print ($string\n);
What is the result of executing this program code?
Consider the program code in the attached exhibit. What is the result of executing this program code?
Which one of the following choices is a unary operator that can apply to only a single variable?
Consider the following program code:
$i = 15;
LOOP: for(; $i < 25; $i++)
{
if ($i % 2)
{
next LOOP;
}
print($i );
}
What is the result of executing this program code?
Consider the following program code:
@array = (10, Masami, 10..13, Niklas);
for ($i = 1; $i < $#array; $i++)
{
print($array[$i] );
}
What is the result of executing this program code?