PrepAway - Latest Free Exam Questions & Answers

What is the result of executing this program code?

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?

PrepAway - Latest Free Exam Questions & Answers

A.
The code will output the following
15 2 4 6 8 10 12 14 16 18 20 22 24

B.
The code will output the following
15 17 19 21 23 25

C.
The code will fail at line 2 because $i is not initialized.

D.
The code will output the following
16 18 20 22 24

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


Leave a Reply