Which of the following statements are true?
When you open a file for reading ,
- If the file does not exist, an error is given.
When you open a file for writing ,
- If the file does not exist, a new file is created.
- If the file exists, the existing file is overwritten with the new file.
Therefore all the options are correct.
So, the correct answer is (d).