Home / CSE MCQs / Ruby Programming MCQs :: Discussion

Discussion :: Ruby Programming MCQs

  1. What is the output of the given code?

    a="string"
    b="strings"
    if(a==b)
        print ("a and b are same")
    else 
        print "Not same"
    end
  2. A.
    a and b are same
    B.
    Not same
    C.
    a==b
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    a and b are not similar hence the else condition will get executed. Output: Not same


Be The First To Comment