Q. Which method is used to get the length of a string in Ruby?

  • (A) size
  • (B) length
  • (C) count
  • (D) Both size and length
πŸ’¬ Discuss
βœ… Correct Answer: (D) Both size and length
Explanation: Both 'size' and 'length' return the length of a string in Ruby.
Explanation by: Rati Dubey
Both 'size' and 'length' return the length of a string in Ruby.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
74
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
89%
Success Rate