A programmer wants to add a new line of text to the end of an existing file…

2026

A programmer wants to add a new line of text to the end of an existing file named logs.txt without deleting the current content. Which mode should they use in the open() function?

Answer: C. a

  1. A.

    r

  2. B.

    w

  3. C.

    a

  4. D.

    x

Attempted by 387 students.

Show answer & explanation

Correct answer: C

Explore the full course: Bpsc

Loading lesson…