Home / CSE MCQs / Ruby Programming MCQs :: Discussion

Discussion :: Ruby Programming MCQs

  1. What is the output of the given code?

    string_array = ["a","e","i","o","u"]
    boolean_array = ["True","False"]
    puts string_array[3]
    puts boolean_array
  2. A.
    [a","e","i","o","u"].
    B.
    Error
    C.
    o True False
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    The array is a string array and the index is 3 so 'o' will be the output and then the boolean_array will get printed. Output: o True False


Be The First To Comment