Chapter 6: Problem 8
What is the purpose of opening a file?
Short Answer
Expert verified
Answer: Some common modes for opening a file include read mode (r), write mode (w), append mode (a), read and write mode (r+), and binary mode (b). It is essential to close a file after performing operations on it to ensure that any changes made to the file are saved and to prevent resource leaks or conflicts.