fopen($file_doc,”r+&rdquo opens a file for
-
reading
-
writing
-
none of above
-
both of above
D
Correct answer
Explanation
The 'r+' mode opens a file for both reading AND writing. It doesn't truncate the file and places the pointer at the beginning. Option A is incomplete (reading only). Option B is incomplete (writing only). Option C is wrong because 'r+' does both. Option D correctly states it handles both operations.