Vidyalelo
Ruby Programming · all questions

Operators in Ruby
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

61

Questions

1/4

Page

Pick an option on a question to see the right answer and solution.

Which operator is used for addition in Ruby?

Select an option to see the answer and solution.

What does the += operator do in Ruby?

Select an option to see the answer and solution.

What is the result of the expression: 5 % 2 in Ruby?

Select an option to see the answer and solution.

Which operator is used for exponentiation in Ruby?

Select an option to see the answer and solution.

What does the == operator do in Ruby?

Select an option to see the answer and solution.

What does the != operator do in Ruby?

Select an option to see the answer and solution.

What does the > operator do in Ruby?

Select an option to see the answer and solution.

What does the <= operator do in Ruby?

Select an option to see the answer and solution.

Which operator is used for modulo in Ruby?

Select an option to see the answer and solution.

What is the result of the expression: 3 ** 2 in Ruby?

Select an option to see the answer and solution.

What does the && operator do in Ruby?

Select an option to see the answer and solution.

What is the result of the expression: true && false in Ruby?

Select an option to see the answer and solution.

What is the result of the expression: 6 / 2 in Ruby?

Select an option to see the answer and solution.

Which operator is used for subtraction in Ruby?

Select an option to see the answer and solution.

What does the *= operator do in Ruby?

Select an option to see the answer and solution.

What is the result of the expression: 10 % 3 in Ruby?

Select an option to see the answer and solution.

What does the >= operator do in Ruby?

Select an option to see the answer and solution.

What is the result of the expression: 9 / 2 in Ruby?

Select an option to see the answer and solution.

What is the result of the expression: 3 ** 3 in Ruby?

Select an option to see the answer and solution.

What is the result of the expression: 4 > 2 && 5 < 7 in Ruby?

Select an option to see the answer and solution.