Class 11 Computer Science Chapter 6 File Handling Quiz 4 (25 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. Apa yang akan ditampilkan jika fwrite berhasil menulis data ke file?
2. What does feof() check for?
3. While writing data to file using ..... mode, the previous content of existing file will be overwritten and new content will be saved.
4. What is a relative path?
5. What is the need for data files in Python?
6. Which of the following is NOT a characteristic of a user-defined function?
7. Return type of which of the following methods is list
8. Select the most appropriate format of seek ()
9. Which Tkinter widget allows users to select multiple options?
10. Select the statement to open a file named MYDATA.dat in read binary mode. Let the file object name be myfile.
11. Fungsi mana yang digunakan untuk membaca data dari file biner?
12. Function returns the current position of file pointer in the file
13. What will the following code output if data.dat contains a pickled dictionary \{'A':1, 'B':2\}? import pickle with open('data.dat', 'rb') as f:data = pickle.load(f) print(data['A'])
14. What happens if you open a file in 'write' mode?
15. Which of the following is not a valid mode to open a file?
16. What are the different modes in which you can open a file in Python?
17. ..... and ..... statements are used to prevent an exception from terminating a program
18. What is the method to read a file line by line in Python?
19. Which mode(s) will error if the file is not found when trying to open() it?
20. Which method is used to check if a file is writable?
21. Which method is used to close an opened file in Python?
22. Where files are stored permanently?
23. Is it possible to create a text file in python?
24. Information stored on a storage device with a specific name is called a .....
25. What is the method used to read a specific number of bytes from a file in Python?