πŸ“Š Ruby
Q. What is the correct way to cast a string to an integer in Ruby?
  • (A) string.to_i
  • (B) string.integer
  • (C) int(string)
  • (D) string.convert(:integer)
πŸ’¬ Discuss
βœ… Correct Answer: (A) string.to_i

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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