πŸ“Š Ruby
Q. What will be the output of the given ruby code?
Code:
arr = [1, 2, 3, 4]
print arr
  • (A) [1, 2, 3, 4]
  • (B) 1234
  • (C) error
  • (D) Infinite Loop
πŸ’¬ Discuss
βœ… Correct Answer: (A) [1, 2, 3, 4]

Explanation: A variable arr is declared and [1, 2, 3, 4] is stored in that variable.

Explanation by: Yami Thakur
A variable arr is declared and [1, 2, 3, 4] is stored in that variable.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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