Which one of the following choices lists only valid expression operators?
Answer : C
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?
Answer : D
Consider the following program code:
$x = 5;
$y = 10;
while(++$x < 10 && ++$y < 15)
{
print ($x $y );
}
print ($x $y );
What is the result of executing this program code?
Answer : B
Which statement is the most accurate?
Answer : D
Consider the following assignments
$x = 9
$y = 7
$z = 5
Given these assignments, which of the following expressions evaluates as true?
Answer : C
Consider the following statement.
$buffer = a string;
Also consider that a file named test.txt contains the following 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: $!");
read(OUT, $buffer, 15, 4);
print $buffer;
Answer : B
Consider the following code:
%chars = ("a", "100", "b", "90", "c", "80");
Which one of the following choices will reverse the key/value pairing of the code?
Answer : B