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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which of the following functions do you use to write data in the binary format using PICKLE module?
2. Write the method to read from a csv file
3. What is the purpose of CSV File Handling in Python?
4. Which of the following functions changes the position of file pointer and returns its new position?
5. ..... is the other name for the file object?
6. Which logical operator is used to checks for each and every condition is true?
7. Files that can be read bye text editors are called
8. Why is it important to close a file after operations in Python?
9. Which of the following commands can be used to read "n" number of characters from a file using the file object ?
10. How can you read a specific number of characters from a file?
11. What function is used to open a file in Python for writing?
12. In fopen("mystory.txt", "r"), what does the mode "r" mean?
13. Assume that size of an integer is 32 bit. What is the output of following program?#includestruct st\{ static int x; int y;\};int main()\{ printf("%zu, sizeof(struct st)); return 0; \}
14. Which function is best to check if a file exists before opening?
15. We can manage (create/read/update)CSV files using
16. Which function is used to read the contents of a file in Python?
17. What will happen if file.read() is called twice?
18. This statement terminates the loop containing it.
19. Mention the data type of variable check in the following statements? a. check=f.read()b. check=f.readline()c. check=f.readlines()
20. What is the purpose of the 'os.path.exists()' function?
21. Which of the following exception is thrown in case when the file specified for writing is not found?
22. What is the result of this code snippet?with open('data.txt', 'r') as f:content = f.read() print(content)
23. Apa yang dimaksud dengan file biner?
24. To read the next line of the file from a file object infi, we use:
25. How do you append data to an existing file in Python?