Week 4 Unit 2: Self-test

Last updated: (05. April 2024)

Question 1

What are the three main steps when working with files?


write file; change file; read file❌
open file; access file; close file✅
select file type; name file; store file❌
open file; access file; store file❌

Question 2

Which of the following statements about the different modes used when opening a file are correct?

Note: There are 3 correct answers to this question.


In mode "r+", a new file is created.❌
In mode "w+", you can read data from the file✅
In mode "w", a new file is created. If another file with the same name exists, this file is deleted.✅
In mode "r", you can read the file, but you cannot change data.✅
In mode "a", you can read data from the file.❌

< Previous unit | Next unit > | Course Overview