M

Mr. Dubey • 87.94K 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: 79
  • Filed under category Ruby

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.


Question analytics