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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What exception is raised when trying to open a non-existent file?
2. What is the outcome if you open a file in 'WRITE' mode and the file already contains data?
3. Apa tipe data yang akan dikembalikan oleh fungsi numpy.loadtxt()?
4. What is the purpose of the 'write lines' method in Python file handling?
5. .... function is used to write data in a binary file
6. File object is reference to a file. It is used to read and write data to a file.
7. Which one of the following databases has PHP supported almost since the beginning?
8. What method is used to write data to a CSV file?
9. What does the "b" mode specify when opening a file in Python?
10. What mode would you use to append data to an existing file?
11. What must a program do before reading or writing to a file?
12. Why is it important to close the file when file handling?
13. Which is data type of file pointer?
14. ..... & ..... statements together can handle runtime exceptions.
15. What does feof(fp) check?
16. Closing files is important because it frees up RAM for other files and programs
17. Which of these is associated with a specific file and provides a way for the program to work with that file?
18. Apa nama method yang digunakan untuk menutup sebuah file yang terbuka di Python?
19. What method should be called to close a FileWriter after writing?
20. Which of the following will read entire content of file(file object 'f')?
21. What happens if you open a file in 'w' mode that already exists?
22. What is a CSV file?
23. When we read from a file, what type of value do we get returned to us, by default?
24. Which of the following is the correct way of declaring a float pointer?
25. In the data hierarchy, which of the choices is described as 'single values of letter or numbers'?
26. Which mode create new file if the file does not exist?
27. Is there a delimiter for binary files
28. Which file execute faster?
29. Apa yang dilakukan ios::app?
30. Which of the following is not a valid mode for opening a binary file?
31. What utility allows you to manage packages from the command line?
32. Which of the following commands can be used to read the next line in a file using the file object ?
33. Describe how to read a specific column from a CSV file.
34. Which of the following codes will open a file named as Sample for reading and writing purposes?
35. What is the purpose of the seek() function in file handling?
36. What does the 'read()' method do when used on a file object?
37. ..... returns a writer object which writes data into CSV file.
38. A class which is capable of creating files and writing information to files is called
39. Mode in the following program to open file for writing in a mode where new data will be added at the end of old datafile =open("poem.txt", " ..... ")
40. Which function deletes a file?
41. What will be the output of the followingfrom import factorialprint(math.factorial(5))
42. What are the advantages of using Fileinputstream and Fileoutputstream in Java?
43. What does this do? .split()
44. Which is not a text file?
45. Evaluate the following expressions:6 * 3 + 8**4 // 5-8
46. Which of the following is not a valid attribute of a file object (fp)?
47. Which method is used to rename a file in Python?
48. What is the function of putc() in C programming?
49. What is the purpose of the glob() method in pathlib?
50. Which of the following is modes of both writing and reading in binary format in file?
51. What is the extension of binary file?
52. To remove the spaces present at start and end of the string, you can use
53. What is the purpose of using 'rb' mode when opening a binary file in Python?
54. How can programs ensure that data is not lost when they are closed?
55. Which file contains information in the same format as it is stored in memory?
56. Delimiters, such as (, :; t | ) are present in
57. Which method would you use to read a file line by line in Python?
58. In seek()-mode 1 will indicate.
59. What is the purpose of the 'close()' method?
60. It describe how to access a given file or directory, starting from the root of the file system.