Home / CSE MCQs / Ruby Programming MCQs :: Discussion

Discussion :: Ruby Programming MCQs

  1. What is the output of the code?

    variable="true".reverse
       if variable
       puts "true"
       else
       puts "false"
       end
  2. A.
    False
    B.
    True
    C.
    Syntax error
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Condition is satisfied and value is not changed. Output: True


Be The First To Comment