Multiple choice technology web technology

fopen($file_doc,”r+&rdquo opens a file for

  1. reading

  2. writing

  3. none of above

  4. both of above

Reveal answer Fill a bubble to check yourself
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.