PrepAway - Latest Free Exam Questions & Answers

What is the result of these lines of code?

Consider the following lines of code:
@array1 = (“apples”, “oranges”, “pears”, “plums”);
foreach (@array1) {print “$_\n”};
What is the result of these lines of code?

PrepAway - Latest Free Exam Questions & Answers

A.
applesorangespearsplums

B.
apples oranges pears plums

C.
apples

D.
apples
oranges
pears
plums

Explanation:
apples
oranges
pears
plums


Leave a Reply