Ruby Programming Quiz


Play this quiz that will help you to excel in Ruby certification exams, placements etc. This Ruby programming quiz consist of 10 questions that you need to solve in 10 minutes. We’ve specially designed this quiz so that you can quickly acquaint to the pattern of questions you can be asked in placement drives, certification exams etc. This Ruby programming test enables you to assess your knowledge of Ruby programming.

Take the Free Practice Test



Ruby MCQs

Practice Ruby MCQ Questions, which will help you to understand Ruby Programming related concepts and also helps you to prepare for placements, interviews, competitive exams etc.

Ruby Quiz

Try Free Ruby Quiz, to start a quiz you need to login first, after login you will get start quiz button and then by clicking on that you can start quiz. You will get 10 Minutes to answer all questions.

Ruby Quiz

1. What is the output of the given code?

a=[[a,b]]
b=[[e,a]]
print a + b

[["a", "b"], ["e", "a"]].
[["2a", "b"], ["e"]].
TRUE
FALSE

2. What will be the output of the given code?

i=1
for i in 6..10
puts i**2
end

36 49 64 81
49 64 81 100
49 64 81
36 49 64 81 100

3. Reserved word can not be used as?

constant
variable names
Both A and B
None of the above

4. Which statement is used to Restarts this iteration of the most internal loop, without checking loop condition?

break
next
redo
retry

5. Which statement is used to declares code to be called before the program is run?

Start
Begin
Here
End

6. What will the following expression evaluate to?

!true && !false

TRUE
FALSE
Syntax Error
None of the above

7. Which statement is used to Jumps to the next iteration of the most internal loop?

break
next
redo
retry

8. Which statement is used to restarts the invocation of the iterator call?

break
next
redo
retry

9. In range operator ... is used for ?

Creates a range from start point to end point inclusive.
Creates a range from start point to end point exclusive.
Creates a range from start point inclusive to end point exclusive.
Creates a range from start point exclusive to end point inclusive.

10. Which of the following is Exit Controlled loop?

do..while
For
Until
While

Results