Class 11 Computer Science Chapter 6 File Handling Quiz 2 (60 MCQs)

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which class in Java is used for file handling?
2. Fflush(NULL) flushes all .....
3. In file handling, what do the terms "r" and "a" stand for?
4. What is the purpose of a module in Python?
5. Which mode is used to open a file for appending in Python?
6. ..... class provides the capability to read primitive data types from an input stream.
7. Best way to calculate total from numeric column in CSV?
8. What are the different types of function arguments in Python?
9. Which method writes multiple lines to a file?
10. What is the purpose of the 'open' function in Python?
11. Which function is used to close a file in C++ after performing file operations?
12. This mode will open file with read write purpose
13. Which of the following is NOT a basic operation on files?
14. Apa yang akan ditampilkan jika fwrite berhasil menulis data ke file?
15. What does feof() check for?
16. While writing data to file using ..... mode, the previous content of existing file will be overwritten and new content will be saved.
17. What is a relative path?
18. What is the need for data files in Python?
19. Which of the following is NOT a characteristic of a user-defined function?
20. Return type of which of the following methods is list
21. Select the most appropriate format of seek ()
22. Which Tkinter widget allows users to select multiple options?
23. Select the statement to open a file named MYDATA.dat in read binary mode. Let the file object name be myfile.
24. Fungsi mana yang digunakan untuk membaca data dari file biner?
25. Function returns the current position of file pointer in the file
26. 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'])
27. What happens if you open a file in 'write' mode?
28. Which of the following is not a valid mode to open a file?
29. What are the different modes in which you can open a file in Python?
30. ..... and ..... statements are used to prevent an exception from terminating a program
31. What is the method to read a file line by line in Python?
32. Which mode(s) will error if the file is not found when trying to open() it?
33. Which method is used to check if a file is writable?
34. Which method is used to close an opened file in Python?
35. Where files are stored permanently?
36. Is it possible to create a text file in python?
37. Information stored on a storage device with a specific name is called a .....
38. What is the method used to read a specific number of bytes from a file in Python?
39. What method would you use to append data to an existing file?
40. Which mode would you use to append data to a text file?
41. How can you use the tell() and seek() methods in Python file handling?
42. In file handling, what does EOF stand for, and why is it significant?
43. How can you append data to an existing file in Python?
44. A binary file has 5 records stored using pickle.dump(). Which error occurs if you try pickle.load() after last record?
45. LOCK ..... EX stands for
46. Pada akhir presentasi, kata apa yang muncul di layar?
47. In a binary file 'wb' mode is equal to .....
48. What does the 'R' parameter signify in the 'open' command when opening a file in Python?
49. Taran is working on a project that involves reading and writing CSV files. He comes across the newline=" argument in the open() function. What does this argument do when working with CSV files?
50. What does with open( ..... ) as f:ensure?
51. Which one of the following is correct syntax for opening a file.
52. Which of the following mode is applied while writing into the file?
53. Which library is used for CSV handling in Python?
54. In the below statement myfile is called ..... myfile=open("school.txt")
55. What is the purpose of the APPEND mode in file handling?
56. Apa yang digunakan untuk membaca baris demi baris dari file?
57. What will be the output of the following Python codeprint(4 + '3')
58. Which method rolls back the present transaction?
59. What will happen if an exception is raised in a 'try' block but no 'except' block is provided?
60. How can you read a specific number of bytes from a file?