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. In ruby, User can access the string elements by using the__________?

{}
[]
()
All of the above

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

 boolean_var = !(100 / 10 === 10)
puts boolean_var

TRUE
FALSE
Type Error
Syntax Error

3. What is the output of the given code?

array = [100, 200, 300, 400, 500]
print array[5]

500
Syntax Error
Nil
Name Error

4. What does end represent?

keyword represents the ending of loop
keyword represents the start of loop
keyword represents the start and ending of loop
keyword represents the infinite loop

5. What will the following expression evaluate to?

!true && !false

TRUE
FALSE
Syntax Error
None of the above

6. String are?

mutable
unmutable
Both A and B
None of the above

7. String may consists of?

Number
letter
Special character
All of the above

8. Double quotes and single quotes will interpolates ?

TRUE
FALSE
double quotes will interpolates
Single quotes will interpolates

9. Constants in ruby begin with ?

Lowercase
!
!
Uppercase

10. Instance variables in ruby begin with?

@
#
$
&

Results