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

Quiz Instructions

Select an option to see the correct answer instantly.

1. CSV files are known as flat text files. Is the statement true or false.
2. Name the module that has to be imported to write a binary file.
3. What does this code myfile=open( "taxes.txt" ) perform
4. Which of the following is a function of the pickle module?
5. What is the mode 'w' used for when opening a file?
6. How can you check if a path is absolute using pathlib?
7. Which of the following classes can be used for both reading and writing to a file in C++?
8. What is the output of the program that reads and writes using binary mode?
9. Choose an exception if attempt to divide number by zeroint number = 89 / 0;System.out.println("The answer is '' + number);
10. What does the method returns?
11. What is used to store values in variables
12. What is the output of the following program? import csv d=csv.reader(open ("city.csv'))next(d)for row in d:print(row) if the file called "city.csv" contain the following detailschennai, mylaporemumbai, andheri
13. To append text to an existing file without erasing its contents, which mode should you use?
14. In which mode, should we open the file to add data into the file?
15. How can you write data to a file in Python?
16. In this program, what does the function myAdd do?def myAdd(a, b) return a+b
17. Serial Files are organized by time.
18. Apa tipe data yang akan dikembalikan oleh fungsi pandas.read ..... csv()?
19. The ..... mode adds the data to the end of file.
20. Tell( ) function use to see the current position of the file pointer.
21. Which mode specifier will open a file but will not let you change the file or write to it?
22. What are the basic file operations in Python?
23. To perform File I/O operations, Which of the following header files is used?
24. What does this code do?file.write ( song )
25. Exception generated by try block is caught in ..... block?