Home / Programming Questions / Ruby MCQs / Page 12
Dear candidates you will find MCQ questions of Ruby here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
Y
Q. Each element in an array is associated with _______.
Y
Q. Array indexing in ruby starts at_________.
Y
Q. In Ruby, Array index -1 represent ______.
Y
Q. Which of the following is correct syntax to create an array in ruby?
Y
Q. What will be the output of the given ruby code?
digits = Array(0...9) puts #{digits}
Y
Q. What will be the output of the given ruby code?
digits = Array(0..9) num = digits.at(6) puts #{num}
Y
Q. What will be the output of the given ruby code?
Y
Q. What will be the output of the given ruby code?
a = [ a, b, c ] puts a.pack(a3a3a3)
Don't have account? Register here.