Consider the following program code:
1.$x = 100;
2.$y = 15;
3.$result = $x % $y;
4.
5.print$result;
What is the result of executing this program code?
Answer : C
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?
Answer : A
Consider the following program code:
$val = 5;
if ($val++ == 6)
{
print("True ");
}
else
{
print("False ");
}
if ($val++ == 6)
{
print("True ");
}
else
{
print("False ");
}
What is the output of this code?
Answer : B
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?
Answer : A
Which of the following choices demonstrates the correct syntax to pass the argument $arg2 to the subroutine getpass?
Answer : A
Assuming $a = 2, which of the following evaluates as false?
Answer : C
Which statement is the most accurate?
Answer : D