What is the result of executing this program code?

Consider the following program code:
@stack = (10, 10..25);
push(@stack, yellow);
shift(@stack);
push(@stack, white);
print shift(@stack);
What is the result of executing this program code?

Consider the following program code:
@stack = (10, 10..25);
push(@stack, yellow);
shift(@stack);
push(@stack, white);
print shift(@stack);
What is the result of executing this program code?

A.
The code will fail at line 3 because shift requires two arguments.

B.
The code will output the following:
11

C.
The code will output the following:
10

D.
The code will output the following:
white



Leave a Reply 1

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