πŸ“Š Ruby
Q. Which method is used to convert a string to integer in Ruby?
  • (A) to_int
  • (B) to_i
  • (C) int()
  • (D) convert_to_int
πŸ’¬ Discuss
βœ… Correct Answer: (B) to_i

Explanation: The 'to_i' method converts a string to an integer in Ruby.

Explanation by: Rati Dubey
The 'to_i' method converts a string to an integer in Ruby.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
54
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
95%
Success Rate