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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What happens if you try to write to a file that does not exist?
2. What does ftell() function return in C?
3. What is the data type of data read to and from a file?
4. Which of the following is used to read all lines in a file as a list?
5. If we want to add new data without overwriting the previous content then we should write using ..... mode
6. What is the purpose of the 'close()' function in programming languages when working with files?
7. Which of the following is not a standard exception in Python?
8. Which Python function is used to open a text file for reading?
9. A binary file stores information in ASCII or Unicode characters.
10. In which scenario would you use the 'APPEND' mode?
11. Which mode in Python is used to open a file for reading?
12. How can you read a file using a context manager?
13. The ..... character is used to seprate the values in TSV files.
14. Kamut accidentally used "w" mode on a project file that contains important information. What is the immediate risk?
15. Files need to be closed when using file handling in order to save data
16. What does the 'read ..... text()' method do?
17. The read() is indicate .....
18. What is the use of tell() method in Python?
19. What function is used to write data to a binary file?
20. Which function is used to close the file?
21. Which command is used to close an open file in a program?
22. What is the difference between absolute and relative paths?
23. Which step is necessary after writing to a file?
24. What is a CSV file and how is it different from a text file?
25. Which exception is thrown by read() method?