Vidyalelo
Ruby Programming · Q4

File Input Output in Ruby

Programming · Ruby Programming · question 4

Q4

What is the purpose of the File.readlines() method in Ruby?

A.
To delete all lines from a file
B.
To write all lines of a file from an array
C.
To read all lines of a file into an array
Answer
D.
To read a specific line from a file

Answer: Option C

Solution

Answer: Option C
No explanation is given for this question Let's Discuss on Board