Home / Programming MCQs / Ruby MCQs / Question
Y
Q. What will be the output of the given ruby code?
a=[1,2,3,4,5] b=[1,2,4,6,8] if a[3]==b[2] print Equal end
a[3]=4 and b[2]=4 hence it will print equal according to the given if condition
You must be Logged in to update hint/solution
What is the correct way to define a symbol in Ruby?
What happens if an exception is raised but not rescued in Ruby?
What is the output of the given code? my_string=Ruby puts(my_string)
What does the slice_before method do in Ruby enumerators?
Which of the following is NOT a valid data type in Ruby?
Discusssion
Login to discuss.