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

Quiz Instructions

Select an option to see the correct answer instantly.

1. How do you create a Fileoutputstream object in Java?
2. Fseek(fp, 0, SEEK ..... SET) moves pointer to:
3. Which Tkinter widget is used for drawing shapes and graphics?
4. Which is used for writing data to a file in file handling?
5. The ..... block holds the code to be run (Run the code) checked for any error, if exists
6. What does two periods (dot-dot) mean in a path?
7. What is the purpose of the 'a' mode when opening a file in Python?
8. To open a file poem.txt for reading, the correct syntax is .....
9. What does opening a file in mode 'a' mean?with open("test.txt ", 'a') as f:
10. Public class X \{ public static void main(String [] args) \{ try \{ badMethod(); System.out.print("A"); \} catch (Exception ex) \{ System.out.print("B"); \} finally \{ System.out.print("C"); \} System.out.print("D"); \} public static void badMethod() \{ throw new Error(); /* Line 22 */ \} \}
11. Files are having ..... nature.
12. What method would you use to read all lines from a file into a list?
13. What is the primary function of a file handler in computer programming?
14. What is the result of trying to read a file that does not exist?
15. What method is used to write multiple rows to a CSV file at once?
16. What does the 'with' statement do when handling files?
17. A=m.read(3)Here the above code read(3) will point which pointer position ..... if the file content is ..... 12, welcome-1jio
18. What does file.write("Hello") do?
19. Usb stangs for
20. How do you open a file for writing in Python?
21. Which of the following file-modes does retains file data and append new data.
22. To write dictionaries, tuples and any other python objects in binary file ..... function is used
23. What exception is raised when trying to open a non-existent file?
24. What is the outcome if you open a file in 'WRITE' mode and the file already contains data?
25. Apa tipe data yang akan dikembalikan oleh fungsi numpy.loadtxt()?