Examveda

How do you read the entire contents of a file into a string in Ruby?

A. file.gets()

B. file.readlines()

C. file.read()

D. file.each_line()

Answer: Option C


This Question Belongs to Ruby Programming >> File Input Output In Ruby

Join The Discussion

Related Questions on File Input Output in Ruby