Vidyalelo
Ruby Programming · Q80

Control Structures in Ruby

Programming · Ruby Programming · question 80

Q80

What is the output of the given code? age = 5 case age when 0 .. 2 puts "baby" when 3 .. 6 puts "little child" when 7 .. 12 puts "child" when 13 .. 18 puts "youth" else puts "adult" end

A.
baby
B.
adult
C.
little child
Answer
D.
youth

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board