Practice mode C Language

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.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.