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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which function is used to read a character from a file?
2. The ..... function removes the given character from both ends.
3. What will be the output of the following Python code?lst = [1, 2, 3]lst[3]
4. Suresh wants to open the binary file student.dat in read mode. Which of the following modes should he use?
5. In Seek () ..... is a number specifying number of bytes.
6. What is the purpose of fclose()?
7. The ..... text file a specific character is stored to separate values
8. This command will open MyFile = open('MyText.txt', 'r')
9. Which symbol is used for append mode?
10. Which of the following is NOT a valid file access mode in Python?
11. What is the significance of the 'with' statement when handling files in Python?
12. Which mode in file handling will create a file, if the file does not exist?
13. The command used to skip a row in a CSV file is
14. Which method is used to read a single line from a file in Python?
15. Which function is used to determine if a directory exists or not?
16. What is the significance of using serialization in Java?
17. Which of the following function is used to write or store data (objects) to a binary file?
18. How do you read a file line by line in a loop?
19. How can you check if a file exists before opening it?
20. Which of the following function is used to write data in binary mode?
21. How do you handle errors while working with files in Python?
22. Which method is used to write a list of strings to a file?
23. Can opening a file in 'write' or 'append' mode create a new file?
24. Which function is used to save a file
25. Which of the following is the correct syntax of file object 'fobj' to write sequence data type using writelines() function?