Home / Programming MCQs / Ruby MCQs / Question
M
Q. What is the output of the given code? a = 5 b=10 while a<b do puts a*b a+=2 b-=2 end
No solution found for this question.
Add Solution and get +2 points.
You must be Logged in to update hint/solution
What is the output of the given code? i = 0 while i < 5 puts i i=(i+1)**2 end
What is the default file extension for Ruby files?
What is the result of the expression: true && false in Ruby?
If expression. The expression can be of which type?
What does the "stabby lambda" (->) syntax in Ruby represent?
Which assertion method is commonly used in RSpec for testing equality of values?
Which of the following is not a valid datatype?
Which command is used to list all gems installed on the system in Ruby?
What is the correct syntax to declare and initialize a variable in Ruby?
In Ruby, which method is used to define getter and setter methods for class attributes?
Discusssion
Login to discuss.