Home / CSE MCQs / Ruby Programming MCQs :: Discussion

Discussion :: Ruby Programming MCQs

  1. What is the output of the given code?

    a=["hey", "ruby", "language"]
    b=["hey", "ruby", "language"]
    if a==b
        print "Equal"
    else
        print "Not equal"
    end
  2. A.
    Equal
    B.
    Error
    C.
    Not equal
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    Elements of both the array are same and in same sequence hence they are equal. Output: Equal


Be The First To Comment