Advertisements
Advertisements
Question
In which of the file open mode, the new content will be overwritten on the old content?
Options
<r>
<w>
<a>
<rb>
MCQ
Solution
<w>
Explanation:
The file is opened in write mode when you type <w>. If the file doesn't already exist, it will be created. If it already exists, all of its contents will be rewritten.
shaalaa.com
Opening and Closing a Text Files
Is there an error in this question or solution?