Home > MCQs > IT & Programming > Ruby MCQs

Ruby MCQ

Quizack is known to offer fully customized Ruby MCQs prepared by subject matter experts. Ruby multiple choice questions and answers will surely boost your knowledge as per the standards. Moreover, Quizack offers user-friendly and interactive testing engines for the sake of online practice.

Ruby Quick Quiz

Question 1 of 10
  • Which of the following statements regarding catch and throw blocks are true?

    Answer & Explanation

    Correct Answer: D it the input does not contain correctly formatted lines. the throw will skip to the end of the corresponding catch.

    Note: This Question is unanswered, help us to find answer for this one

  • Which of the following operators indicate continuation of a statement In Ruby?

    Answer & Explanation

    Correct Answer: \

    Note: This Question is unanswered, help us to find answer for this one

  • In a Ruby installed environment, what happens when "lrb" is typed in the command prompt?

    Answer & Explanation

    Correct Answer: it starts an interactive Ruby Session.

    Note: This Question is unanswered, help us to find answer for this one

  • Assuming that d is an instance of Dir class:

    Answer & Explanation

    Correct Answer: D d.close closes the directOry stream.

    Note: This Question is unanswered, help us to find answer for this one

  • Which of the following statements regarding Ruby variables is incorrect?

    Answer & Explanation

    Correct Answer: Global variables are always preceded by the # character.

    Note: This Question is unanswered, help us to find answer for this one

  • Which of the following is used to cancel the method definition?

    Answer & Explanation

    Correct Answer: undef

    Note: This Question is unanswered, help us to find answer for this one

  • if there are two variables x and y, such that x=10 and y=5, then:

    Answer & Explanation

    Correct Answer: x -y = 5

    Note: This Question is unanswered, help us to find answer for this one

  • Which of the following statements regarding the Ruby programming language are correct?

    Answer & Explanation

    Correct Answer: 'rescue' is a reserved word in RUBY, but it can be used as a method name.

    Note: This Question is unanswered, help us to find answer for this one

  • Ruby Quick Quiz

    battery

    Poor Results!

    You need a lot of improvement.

    Just don't give up!

    Correct Answers: 0/10

    Start Practicing with our MCQs given below.