Home / MCQ Bank / Computer
Computer Control Structures In Ruby

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

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • ruby length is 4

Related Computer Questions

Which multiplexing technique shifts each signal to a different carrier frequency? How private field can be called using reflection? You can move between fields in a form by using any of these keys except Shortcut key to insert a hyperlink in a slide What will be the output of the following Java code? import java.util.*; class hashtable { public static void main(String args[]) { Hashtable obj = new Hashtable(); obj.put("A", new Integer(3)); obj.put("B", new Integer(2)); obj.put("C", new Integer(8)); System.out.print(obj.toString()); } }