When a file is opened in 'w' mode using fopen, if the file already exists, its contents are ________.
- Overwritten
- Appended
- Preserved
- Erased
In 'w' mode, if the file already exists, its contents are overwritten, so option a) "Overwritten" is the correct answer.
Loading...
Related Quiz
- You're tasked with optimizing a program that reads large text files. What strategies could you employ to improve the performance of the file reading operation?
- The strlen function returns the length of a string, excluding the ________.
- What is the impact of using inline functions on the size of the compiled binary?
- In C, if you want to ensure that all the data written to a file is physically stored, you can use the ______ function.
- How does the 'return' statement affect the flow of control within a loop?