151k views
1 vote
T/F if a file with the specified name already exists when the file is opened and the file is opened in 'w' mode, the file will be overwritten.

1 Answer

3 votes

Answer:

True

Step-by-step explanation:

If a file with the same name already exists, its contents are discarded and the file is treated as a new empty file. For example, in the following program, if “test. txt” already exists, its contents are removed and “GeeksforGeeks” is written to it.

User Boolfalse
by
6.6k points