πŸ“Š Ruby
Q. Which method converts a symbol to a string in Ruby?
  • (A) to_s
  • (B) to_str
  • (C) to_sym
  • (D) to_string
πŸ’¬ Discuss
βœ… Correct Answer: (A) to_s

Explanation: The to_s method converts a symbol to its string representation.

πŸ“Š Ruby
Q. How do you check the class of an object in Ruby?
  • (A) object.class
  • (B) class(object)
  • (C) type(object)
  • (D) object.type
πŸ’¬ Discuss
βœ… Correct Answer: (A) object.class

Explanation: Calling .class on an object returns its class.