Multiple choice technology programming languages

. '@array = (“cat”, “rat”, “mat”); chop(@array); print @array;'

  1. ca ra ma

  2. cat rat ma

  3. cat rat

  4. cat rat mat

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

chop() removes the last character from each element of the array when applied to an array. The array (cat, rat, mat) becomes (ca, ra, ma) after chop removes 't' from each element. When printed together, they display as 'caramama' but the expected output format is space-separated as 'ca ra ma'.