What is the output of these lines of code?

Consider the following lines of code:
sub mySub {(
$arg,@args) = @_;
foreach $val (@args) {
SreturnVal .= “$arg, $val\n”;
}
SreturnVal.””. @args;
}
print SmySub(1 “a value”, “another value”, “a parameter”, “another parameter”);
What is the output of these lines of code?

Consider the following lines of code:
sub mySub {(
$arg,@args) = @_;
foreach $val (@args) {
SreturnVal .= “$arg, $val\n”;
}
SreturnVal.””. @args;
}
print SmySub(1 “a value”, “another value”, “a parameter”, “another parameter”);
What is the output of these lines of code?

A.
1, a value 1, another value 1, a parameter 1, another parameter 4

B.
1, a value 1, another value 1, a parameter 1, another parameter a value another value a
parameter another parameter

C.
1, a value, another value, a parameter, another parameter a value another value a parameter
another parameter

D.
1, a value, another value, a parameter, another parameter 4



Leave a Reply 0

Your email address will not be published. Required fields are marked *