PrepAway - Latest Free Exam Questions & Answers

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?

PrepAway - Latest Free Exam Questions & Answers

A.
apples
oranges
pears
plums

B.
The code will output the following:
Masami 10 11 12 13

C.
The code will output the following:
10 Masami 10 11 12 13

D.
The code will output the following:
10 Masami 11 12 13 Niklas

E.
The code will output the following:
Masami 10 11 12 13 Niklas

Explanation:
apples
oranges
pears
plums

One Comment on “What is the result of executing this program code?


Leave a Reply