Multiple choice technology programming languages

@array = (1,2,3,4,5) $scalar1, $scalar2 = @array; print “Scalar1 value is $scalar1”; print “Scalar2 value is $scalar2”;

  1. 1 2

  2. 4 5

  3. 4 4

  4. 4 0

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

When an array is assigned to a list of scalars in list context, elements are assigned sequentially. $scalar1 gets the first element (1) and $scalar2 gets the second element (2). The print statements output these values.