What is the output of this code?

Consider the following program code:
@array = (“one”, “two”);
push(@array, “three”);
shift(@array);
unshift(@array, “four”);

pop(@array);
print($array[0]);
What is the output of this code?

Consider the following program code:
@array = (“one”, “two”);
push(@array, “three”);
shift(@array);
unshift(@array, “four”);

pop(@array);
print($array[0]);
What is the output of this code?

A.
one

B.
two

C.
three

D.
four



Leave a Reply 0

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