

InterviewSolution
Saved Bookmarks
1. |
Which of the following are the modes of both writing and reading in binary format in file?(a) wb+(b) w(c) wb(d) w+ |
Answer» The correct choice is (a) wb+ For explanation: Here is the description below “w” Opens a file for writing only. Overwrites the file if the file exists. If the file does not exist, creates a new file for writing. “wb” Opens a file for writing only in binary format. Overwrites the file if the file exists. If the file does not exist, creates a new file for writing. “w+” Opens a file for both writing and reading. Overwrites the existing file if the file exists. If the file does not exist, creates a new file for reading and writing. “wb+” Opens a file for both writing and reading in binary format. Overwrites the existing file if the file exists. If the file does not exist, creates a new file for reading and writing. |
|