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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Yashi wants to check whether her name is listed in Shortlisted.dat or not. Which command she can write to open the file:
2. What function is used to read a text file in Python?
3. Which of the following represents mode of both writing and reading in binary format in file?
4. True or False:One way you could use a csv file is to add new units/floorplans to a building
5. Which section in the content includes "Random accessing files" ?
6. In seek()-mode 0 will indicate.
7. What is the process of reading data from a text file called?
8. What type of data does read() return?
9. Which of the following prints contents of a file line by line?
10. What will happen if you try to open an existing file in 'x' mode?
11. The type of file doesn't require translation or specific encoding
12. When you try to open a non existing file then
13. Provide an example of an Absolute Path in file handling.
14. What does the following code do?f = open('file.txt', 'r')lines = f.readlines()f.close()
15. What does the readfile() function do in PHP?
16. Which type of file stores data in binary format?
17. What is the topic that we discussed?
18. What happens if no arguments are passed to the seek () method?
19. What is the purpose of closing a file after using it?
20. What happens if you try to read from a file that does not exist?
21. How can a program read an entire line from a text file?
22. What does the os.path.basename() function return?
23. The readlines() returns
24. A pre-defined function is known as
25. This method returns a list where the text between the specified separator becomes the list items.