CBSE Class 12 Computer Science
Question 66 of 136
Data File Handling — Question 5
Back to all questions'rb', ab, a + b, r+
- 'rb' — This mode opens the file for reading in binary mode. It will not erase the existing data and allows reading of the file.
- 'ab' — This mode opens the file for appending in binary mode. It will not erase the existing data but will append new data to the end of the file.
- 'a + b' — This mode opens the file for reading and appending. It will not erase the existing data and allows both reading from and appending to the file.
- 'r+' — This mode opens the file for reading and writing. It will not erase the existing data and allows both reading from and writing to the file.