πŸ“Š Ruby
Q. What is the output of the given code?
multi_d_array = [[1,2,3,4],[0,0,0,0]]
multi_d_array.each { |x| puts "#{x}\n" }
  • (A) [1, 2, 3, 4]. [0, 0, 0, 0]. [[1, 2, 3, 4], [0, 0, 0, 0]].
  • (B) [0, 0, 0, 0].
  • (C) [0, 0, 0, 0][0, 0, 0, 0].
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) [1, 2, 3, 4]. [0, 0, 0, 0]. [[1, 2, 3, 4], [0, 0, 0, 0]].

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
96
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
92%
Success Rate