Home / CSE MCQs / Ruby Programming MCQs :: Discussion

Discussion :: Ruby Programming MCQs

  1. What is the output of the given code?

    if 11>2
       puts "Eleven is greater than two"
       end
       print "You'r right"
  2. A.
    Eleven is greater than two
    B.
    You'r right
    C.
    Eleven is greater than two You'r right
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    If condition is true then code is executed and then it comes out and then execute the remaining code. Output: Eleven is greater than two You'r right


Be The First To Comment