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

Quiz Instructions

Select an option to see the correct answer instantly.

1. File handling commands vary from language to language
2. Which method reads only a single line from the file?
3. When we want to read from or write to a file, we need to open it first. When we are done, it needs to be closed, so that resources that are tied with the file are freed.
4. What will happen if we forget to close a file?
5. Making some changes in the data of the existing file or adding more data is called
6. What is the purpose of the program in Program 13.5?
7. Which method is used to break the link of file object and the file on the disk.
8. What does the 'read' method do when used on a file?
9. Which of the following is correct for reading the entire contents of a file as a string?
10. What method would you use to write data to a file?
11. What does the fwrite() function do in PHP?
12. Select a function which is used to write a string to a file
13. Java uses the concept of
14. How does the Pickle Module help in storing Python objects?
15. What is the purpose of the 'close' function in file handling?
16. M=open("rt.dat", "wb+")Here, the above coed, b will indicate .....
17. What method would you use to write data to a text file?
18. When the pointer variable is declared, the variable name must be preceded by which symbol?
19. How can you write a string to a file in Python?
20. The void pointer can point to which type of objects?
21. What is missing form this code?file = open ( "test1.txt" , " ..... " )
22. Explain the concept of data serialization.
23. Which of the following key word is optional in Exception handling program
24. Explain the difference between 'rb' and 'wb' modes.
25. Which method would you use to read all lines of a file into a list?