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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the output of 'os.path.abspath('.')'?
2. Opening a file with write access causes the contents of the file to removed first.
3. Which function is used to read all characters and return it in form a string?
4. The text files stores information in the form of .....
5. What is a file in the context of computer programming?
6. What does the 'os.path.getsize()' function return?
7. The two writing functions for python text files are ..... and .....
8. When reading a line from a text file called file.txt into a variable called linetext, which of the following should we use?
9. What does the 'READ' mode do when a file is opened in this mode?
10. Fwrite() returns:
11. What is virtual memory and how does it work?
12. The method to set the file marker position.
13. The ..... statement is used to execute as a pair operations.
14. Which function is used to delete a file?
15. What is the purpose of the 'with' statement when handling files in Python?
16. Which functions is used to write all the characters?
17. How many file objects would you need to manage the following situations:(a) to process four files sequentially (b) To process two sorted files into third file
18. If mode argument not passed, then Python will assume it to be ..... by default
19. Which statement(s) is/are true to open a binary file "Record.dat" for reading and writing?
20. Name the error which occurs if the file does not exist when it is opened in 'r' mode
21. If there is fopen function in program then there should always be
22. How do you release dynamically allocated memory in C using free()?
23. What is the difference between FileWriter and Fileoutputstream in Java?
24. The ..... statement is a statement which combines the opening of your file and the processing of a file along multiple exception handling.
25. When should you use the flush() function in Python file handling?