Home / CSE MCQs / Ruby Programming MCQs :: Discussion

Discussion :: Ruby Programming MCQs

  1. What is the output of the given code?

    a="hungry"
    until !a
    puts "hungry"
    a=!a
    end
  2. A.
    hungry
    B.
    Nil
    C.
    Error
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    Until the condition is not met execute the loop. Output: hungry


Be The First To Comment