Question:

Which file opening mode allows editing of file?

Show Hint

Read-write mode is used when both reading and modifying a file are required.
Updated On: Jun 6, 2026
  • Read
  • Write
  • Append
  • Read write
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Concept:
File opening modes define what operations can be performed on a file.

Step 1: Read mode.

Read mode allows only reading from the file. It does not allow editing or writing.

Step 2: Write mode.

Write mode allows writing, but it may overwrite existing content.

Step 3: Append mode.

Append mode allows adding data at the end of the file.

Step 4: Read-write mode.

Read-write mode allows both reading and writing. Therefore, it allows editing of the file. \[ \therefore \text{Correct Answer is (D)} \]
Was this answer helpful?
0
0