Multiple choice technology programming languages

chomp(@array) will

  1. work on first eleemnt of array

  2. work on last element of array

  3. works on all elements of array

  4. wont work on array

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

When chomp is used on an array (@array), it operates on ALL elements, removing trailing newlines from each one. It doesn't just work on first or last element. This is a useful feature for cleaning up multiple lines at once. The option 'wont work on array' is incorrect.