Aspire Faculty ID #13676 · Topic: JAMIA MILLIA ISLAMIA MCA 2023 · Just now
JAMIA MILLIA ISLAMIA MCA 2023

What is the correct file mode that opens preexisting file in read and write mode?

Solution

Solution: - `"r+b"` or `"rb+"` → open **existing file** for both reading and writing (no truncation). - `"w+b"` or `"wb+"` → open file for reading and writing but **creates/truncates** file. - `"ab"` → append binary mode. Hence, the correct mode for **existing file in read-write** is `"r+b"`.

Previous 10 Questions — JAMIA MILLIA ISLAMIA MCA 2023

Nearest first

Next 10 Questions — JAMIA MILLIA ISLAMIA MCA 2023

Ascending by ID
Ask Your Question or Put Your Review.

loading...