KnowledgeBoat Logo

Computer Science

The difference between r+ and w+ modes is expressed as?

  1. No difference
  2. In r+ mode, the pointer is initially placed at the beginning of the file and the pointer is at the end for w+
  3. In w+ mode, the pointer is initially placed at the beginning of the file and the pointer is at the end for r+
  4. Depends on the operating system

Python Data Handling

3 Likes

Answer

In r+ mode, the pointer is initially placed at the beginning of the file and the pointer is at the end for w+

Reason — In 'r+' mode (read and write), the pointer is initially placed at the beginning of the file. In 'w+' mode (read and write), the pointer is placed at the end of the file.

Answered By

3 Likes


Related Questions