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

Quiz Instructions

Select an option to see the correct answer instantly.

1. I want an array that stores values between 2 and 5, which of the following is correct?
2. Which mode truncates the file to zero length?
3. What function would you use to close a file in Python?
4. Which function is used to read single line from file?
5. While appending the data to the binary file, the mode should be .....
6. Which widget in Tkinter is used to display a single line of text input from the user?
7. What is the main purpose of file handling in programming?
8. What is the purpose of the 'struct' module in binary file handling?
9. Discuss the importance of error handling in file operations in Python.
10. What happens when a piece of data is written to a file?
11. Function used to read all the content of file in the form of list:
12. A CSV file is also known as a
13. What is the method used to delete a file in Python?
14. Which are the different ways to read data from the keyboard?
15. What is the method used to reassign the standard input stream in Python?
16. Fprintf() is used to write:
17. Which mode specifier will erase the contents of a file if it already exists and create it if it does not exist?
18. How do you read a text file line by line in Python?
19. The ..... and ..... functions work identically with the text file as well as binary file
20. Which of the following function you can use to write data in the binary format?
21. Which method returns the absolute pathname of a file?
22. How do you close a file in C++?
23. Urutan langkah file yang benar menurut gambar adalah apa?
24. What is the output of the following recursive function?def countdown(n):if n <= 0:print("Blastoff!")else:print(n, end=" ")countdown(n-1)countdown(5)
25. To close a file we use: