Google News
logo
Perl - Quiz(MCQ)
Which of the following method shifts the first value of the array off and returns it, shortening the array by 1 and moving everything down?
A)
pop @ARRAY
B)
push @ARRAY, LIST
C)
shift @ARRAY
D)
unshift @ARRAY, LIST

Correct Answer :   shift @ARRAY


Explanation : shift @ARRAY − Shifts the first value of the array off and returns it, shortening the array by 1 and moving everything down.

Advertisement