Multiple choice technology programming languages

mystring = "Cool " * 3 print mystring, "\n" ===> Find the output

  1. Output Error

  2. Cool * 3

  3. Cool Cool Cool

  4. Cool

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

In Ruby, multiplying a string by an integer repeats it that many times. 'Cool ' * 3 produces 'Cool Cool Cool ' - the string repeats three times with spaces included.