Home / CSE MCQs / Ruby Programming MCQs :: Discussion

Discussion :: Ruby Programming MCQs

  1. What is the output of the given code?

    print "Hey"
       puts "Everyone!"
       print "We are learning Ruby"
  2. A.
    Error
    B.
    Hey everyone we are learning Ruby
    C.
    Hey everyone
    D.
    Hey Everyone

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    Print prints whatever is given and puts in addition to printing it inserts a new blank line.


Be The First To Comment