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
πŸ’¬ Discuss
βœ… Correct Answer: (B) 6
Explanation: This will produce the following result : 6
Explanation by: Yami Thakur
This will produce the following result : 6

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
227
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Yami Thakur
Publisher
πŸ“ˆ
93%
Success Rate