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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which of the following is NOT a function mentioned in the literacy section?
2. What role does the file system play in an operating system?
3. What is the significance of the 'Boolean variable' in the Python file handling examples?
4. What does the csv.writerow() function do?
5. What is the file mode 'r' in Python
6. What will file.read() return?
7. What happens if a file opened with 'ofstream' already exists?
8. What are the two valid keywords used for an exception?
9. 5 'try' block is used to
10. In f=open("fun.txt", 'r'), 'r' refers to .....
11. How do you create a new directory in Python?
12. A variable defined inside the def() we called as
13. What is the output of the following code?def greet(name="Guest"):print(f"Hello, \{name\}!")greet("Alice")greet()
14. What is the purpose of saving data to a file in a program?
15. What is the output of:x = ["apple", "banana"]print("banana" in x)
16. Address stored in the pointer variable is of type.
17. The ..... enables you to write or read data in a position wherever you want.
18. What is the role of the 'pickle' module in data serialization?
19. How can you read a binary file in Python?
20. What does the 'os.path.split()' function return?
21. ..... function without any argument removes leading and trailing whitespaces.
22. Explain the difference between reading a file in text mode and binary mode.
23. Which function is used to write data in binary file?
24. Java is a
25. In a file, user want to add and write the data means, he want to open the file in ..... , , , mode