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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What type of data does the 'write' function handle in binary file operations?
2. Which function open file in python?
3. Which function is used to explicitly close an opened file in C?
4. Defined a statement with default value calculate(principle, rate, interest) which is the correct statement
5. How do you handle exceptions when working with file operations?
6. Which line would write a score to a file
7. What command can you use to separate parts of a line?
8. What does 'rb' mean in open()?
9. What happens when a file is opened in read mode which is in fact not existing?
10. In Python, which file the user cannot able to read .....
11. What is CPU scheduling and why is it necessary?
12. Which function read single line at a time?
13. How can data be retrieved into a program after it has been previously saved and closed?
14. ..... and ..... are the two objects associated with the csv module to reading and write onto a CSV file.
15. What is exception handling?
16. Which of the following class is used for input and output operation when working with bytes?
17. What is always one of the aims for a developer creating a program?
18. Which of the following function is used to write data in the text file.
19. How is the 'fstream' class different from 'ifstream' and 'ofstream'?
20. What is the code to open a file named as Sample and append output to the end of this file?
21. How to open a file safely for reading?
22. Files have two modes of operation-read from and write to.
23. How can you read binary data from a file in Python?
24. How do you close a file after reading or writing in Python?
25. What is the method used to read the entire content of a file in Python?