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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What does the seek() function do in file handling?
2. Reyansh is working on a project where he needs to save the results of his experiments in a structured format. He decides to use a CSV file for this purpose. What does the csv.writer() function do?
3. ..... is the process of converting Python object hierarchy into a byte stream so that it can be written to a file
4. Which method is used to list all files and directories in a directory in Python?
5. What is the key function for working with files in Python?
6. Where files are store permanently?
7. Flush() is used to
8. What is the Output of following program?#include int main()\{ int x = 5; int * const ptr = &x; ++(*ptr); printf("%d", x); return 0; \}
9. If CSV contains values like "New, Delhi", how is it handled?
10. The prefix r in front of a string makes it raw string that means .....
11. What is the default mode in which a file is opened using open()?
12. ..... file is used to transfer data from one application to another
13. Which method is used to deserialize object from binary file?
14. Apa yang terjadi apabila user mencoba membuka file yang tidak tersedia dengan menggunakan fungsi open() dan mode "x" ?
15. How can you write data to a file in binary mode?
16. The separator character which is used in csv file is called as .....
17. What is the default mode of opening a file in Python?
18. Which of the following is a benefit of using the 'with' statement for file operations?
19. Which of the following is not a file handling method
20. What does the "x" mode do when opening a file in Python?
21. Can we read file without opening. (T/F)
22. What method is used to read all lines from a text file at once?
23. How do you write "Hello, world!" to a file in Python?
24. Try:a=10/5 print (a) except ArithmeticError:print ("This statement is raising an exception" )finally:print (" final block executed '' )
25. A collection of characters that is written or read during file handling in C++ is called