Question
a. Which of the following statements are TRUE? check all that apply: -Before a file can be processed for reading or writing, it must be
a. Which of the following statements are TRUE? check all that apply:
-Before a file can be processed for reading or writing, it must be open by the programmer.
-After processing a file, the file should be closed
-When a piece of data is written to a file, it is copied from a variable in RAM to the file.
-Sequential file access means that you have to read data from the beginning of the file before reading data stored at the end.
-In Python, the first argument to function open specifies the mode in which the file will be opened.
b. Which of the following statements are TRUE? check all that apply:
-When opening a file for writing using the 'w' mode, the new file gets to be created on the disk.
-When opening a file for writing using the 'a' mode, the new file erases the old file.
-When a file is open for reading, its read position is set to the beginning of the file.
-When a file is open for reading, a special value known as a read position is internally maintained for that file.
-A file read position is updated each time an item is read from that file
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started