Multiple choice technology programming languages

@array = (10,30,20); sort(@array); print @array;'

  1. 10 20 30

  2. 10 30 20

  3. 30 20 10

  4. 1 2 3

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

In Perl, the sort function is non-destructive and returns the sorted list without modifying the original array in-place. Because the return value is discarded, @array remains unchanged as 10 30 20. Distractors assume in-place sorting or numerical conversion.