A

Admin • 802.91K Points
Coach

Q. What is the output of the given code?
length=gets.chomp
case length.length
when length=4
print "length is 4"
when length=5
print "length is 5"
end

  • (A) ruby length is 4
  • (B) l==10
  • (C) abc length is 4
  • (D) syntax error
  • Correct Answer - Option(A)
  • Views: 3
  • Filed under category Ruby
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.