Home / Programming MCQs / Ruby MCQs / Question

Y

Yami Thakur • 9.05K Points
Tutor III

Q. What will be the output of the given ruby code?

Code:
digits = Array(0..9)
num = digits.at(6)
puts #{num}
(A) 5
(B) 6
(C) 7
(D) 8
Explanation by: Yami Thakur
This will produce the following result : 6

You must be Logged in to update hint/solution

Discusssion

Login to discuss.