Vidyalelo
Ruby Programming · Q24

File Input Output in Ruby

Programming · Ruby Programming · question 24

Q24

How can you check if a file is readable in Ruby?

A.
Using File.readable? method
Answer
B.
Using File.can_read? method
C.
Using File.open("filename", "r") method
D.
Using File.read method

Answer: Option A

Solution

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