Multiple choice technology programming languages

which is among the following is not a loop a) For b) foreach c)map d) until e) switch

  1. a

  2. b

  3. c

  4. d

  5. e

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

Perl's loop constructs include for, foreach, until, while, and do-while. The 'map' function is not a loop construct but a list processing function. The 'switch' statement (given/when in Perl 5.10+) is also not a traditional loop. Option e (switch) is correct as the non-loop answer. Note: Modern Perl has given/when for switch-like behavior.