Assertion (A): Opening a file in 'r+' mode allows for both reading and writing operations on the file.

Reason (R): The 'r+' mode opens the file without truncating its contents, positioning the cursor at the beginning of the file.

Choose the correct option:

1
Both A and R are true, and R is the correct explanation of A.
2
Both A and R are true, but R is not the correct explanation of A.
3
A is true, but R is false.
4
A is false, but R is true.

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation