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 will be the output of the given code?

boolean_var = 3**2 != 2**3 || true
puts boolean_var


2. Which of the following is not a type of Bitwise Operators?

None of the above

3. Reserved word can not be used as?

variable names
Both A and B
None of the above

4. When Whitespace characters such as spaces and tabs can not ignored in Ruby code?

While using strings
While using integer
while using float value
All of the above

5. Why can not we use quotation marks ("or") with boolean?

It indicates that we are talking about a string
It indicates that we are assining a value
It indicates that that we are replacing boolean data type with string data type
None of the above

6. Array index -1 represent ______.

First Element
Middle element
Last element
Reverse the array

7. Which operator is used to find exponent in ruby?


8. eql? Operator is used for?

Used to test equality within a when clause of a case statement.
if the receiver and argument have both the same type and equal values.
if the receiver and argument have the same object id.
All of the above

9. Double quotes and single quotes will interpolates ?

double quotes will interpolates
Single quotes will interpolates

10. What is the output of the given code?