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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What parameter is used to append to a file in Python?
2. What is the purpose of the program described in the video?
3. ..... to read the remaining lines of the file from a file object infi we use .....
4. The sys.stdout is always opened in ..... mode.
5. An ..... allows multiple items to be stored under one variable name, this reduces the need for multiples variables.
6. What is the output of the divmod(15, 4) function in Python?
7. Which of the following is nor a proper file access mode?
8. What type of loop is ideal for processing a file when the number of lines is unknown?
9. Which of the following is not an exception handling keyword in Python?
10. What must be provided to the 'open()' function to successfully open a file?
11. What is the purpose of the delimiter in CSV files?
12. It opens the file for a write.
13. What are the advantages of using segmentation over paging?
14. What is the default mode to open a text file?
15. What is an exception
16. Which one of the following methods is used to recuperating prepared statements resources?
17. The main goal of file handling in python is-
18. What does the 'Path()' function in the pathlib module do?
19. Which method is used to close a file?
20. What data type must be used when reading or writing lines in a text file?
21. What is the first step in handling files in C++?
22. How to create our own exception
23. This method returns an integer that specifies the current position of the file object (file pointer).
24. The ..... device print to display.
25. 'a' mode adds new data to the end of a file
26. To read the entire contents of a text file as a string from a file object fobj, the correct syntax is .....
27. Apa yang dimaksud dengan "file handling" ?
28. This Function write data in the file in the form of list
29. Storing the data in binary files is called .
30. How do you use file streams in C++?
31. Processing of Text file is faster than binary files.(T/F)
32. How do you create a new file using the File class in Java?
33. What is a text file?
34. Which of the following file modes is best for adding new data to the end of an existing file without overwriting its contents?
35. Assertion:CSV is a file format for data storage which looks like a text file. Reason:The information is organized with one record on each line and each field is separated by comma.
36. A programmer want to read and write a file fastly. He want to use ..... file.
37. We want to write something in test.txt file. what is the correct syntax?
38. What does the parent attribute of a Path object return?
39. To read the remaining lines of the file from object fobj, we use:
40. What is the difference between r+ and w+ modes?
41. What is the expected output when passing 2 and 3 to the add ..... two function?
42. Apa yang harus dilakukan sebelum menulis data ke file?
43. Which of the following is NOT a valid file access mode?
44. Which method is used to write multiple lines to a file in Python?
45. Which of the following is used to open a file in Python?
46. Myfile=open ( "one.txt" )-here myfile is indicating .....
47. What is the correct way to open a file for both reading and writing in C++?
48. How can you catch multiple exceptions in a single try block?
49. What is the difference between binary and text file modes?
50. What is the difference between appending and writing to a file?
51. What function is used to read the entire content of a file in Python?
52. Which function is used to open a file
53. What is the default mode used by the open() function in Python when no mode is specified?
54. .py .java .c are .....
55. What is a potential consequence of not closing a file in a program?
56. The mode 'w+' means:
57. How many except statements can a try-except statement have?
58. What does fscanf() do?
59. What function is used to close a file in Python?
60. If a CSV file contains header row, which function is used to skip it?