What does opening a file with fopen(name, “a”) do?
Correct answer A. Opens it for writing at the end, creating the file if it does not exist
Explanation
Mode "a" means append: every write goes to the current end of the file, existing contents are kept, and the file is created if it is missing. "w" would truncate an existing file to zero length, and "r" opens for reading only and fails if the file does not exist. "a+" also allows reading.
Answer checked How we write and check questions
Discussion