Exam PCAP-31-03 All QuestionsBrowse all questions from this exam
Question 64

Which of the following statements are true? (Choose two.)

    Correct Answer: A, C

    If open()'s second argument is 'r', the file must exist or the open function will fail because 'r' stands for reading, and you cannot read a non-existent file. Additionally, if open()'s second argument is 'w' and the invocation succeeds, the previous file's content is indeed lost because 'w' stands for writing, and it truncates the file's content to zero length, effectively erasing it.

Discussion
kstrOptions: AC

AC tested

DKAT2023Options: AC

A and C are correct