Type Conversion Quiz
int = 5
float = 5.5
string = "5"
puts int + float # ...... A
puts string + int # ..... B
puts string + string # .. C
puts float + string # ... D
Which of the above expressions will throw an error?
int = 5
float = 5.5
string = "5"
puts int * float # ...... A
puts string * int # ..... B
puts string * string # .. C
puts float * string # ... D
Which of the above expressions will throw an error?
puts 5.to_s.to_i.to_f.to_s
What is the result of the above expression?