What does File.open() return in Ruby when the file is successfully opened?
Select an option to see the answer and solution.
How do you open a file in Ruby in write mode, creating it if it does not exist?
Select an option to see the answer and solution.
Which method in Ruby is used to read a line from a file?
Select an option to see the answer and solution.
What is the purpose of the File.readlines() method in Ruby?
Select an option to see the answer and solution.
How do you close a file in Ruby after performing file operations?
Select an option to see the answer and solution.
Which method in Ruby is used to write data to a file?
Select an option to see the answer and solution.
What does the 'a+' file mode in Ruby signify?
Select an option to see the answer and solution.
Which method in Ruby is used to check if the end of a file has been reached?
Select an option to see the answer and solution.
What does the File.exist? method in Ruby return if the specified file exists?
Select an option to see the answer and solution.
What does the 'r+' file mode in Ruby signify?
Select an option to see the answer and solution.
What is the purpose of the File.exist? method in Ruby?
Select an option to see the answer and solution.
Which method in Ruby is used to set the position of the file pointer?
Select an option to see the answer and solution.
What does the File.rename() method in Ruby do?
Select an option to see the answer and solution.
How do you read the entire contents of a file into a string in Ruby?
Select an option to see the answer and solution.
Which method in Ruby is used to delete a file?
Select an option to see the answer and solution.
What is the purpose of the File.size method in Ruby?
Select an option to see the answer and solution.
What is the result of using File.open() with the block syntax in Ruby?
Select an option to see the answer and solution.
What does the 'w' file mode in Ruby signify?
Select an option to see the answer and solution.
How do you check if a file in Ruby is readable?
Select an option to see the answer and solution.
What method is used to check if a file is writable in Ruby?
Select an option to see the answer and solution.