Multiple choice technology web technology

fopen($file_doc,"r+"); 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 in fopen() opens a file for both reading AND writing operations. The file pointer is placed at the beginning of the file, allowing you to read existing content and write new content. Options A (reading only) and B (writing only) are incomplete since r+ supports both operations.