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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What happens if fopen("abc.txt", "r") fails?
2. What does the 'r' mode in the 'open()' function signify?
3. What happens if you try to close a file that is already closed?
4. In CSV file all data's are stored in ..... format
5. What is the purpose of the sys.path list?
6. The csv file is a ..... file.
7. What happens if the CSV file being read by Reyansh contains inconsistent row lengths?
8. ..... Open the file for writing. The file is created if it does not exist.
9. What will be the ouput-f=open('abc.txt', 'w')x=f.read()f.close()print(x)
10. What is the role of the function fputs in file handling?
11. Which types of file requires translation?
12. What is the significance of file modes like 'r', 'w', 'a'?
13. File handling isn't needed as programs can save data to be accessed again later without them
14. A stream is a sequence of data and stream is composed of .....
15. How can standard output be redirected to a file in Python?
16. What will be the output of the following code?import mathprint(math.sqrt(16))
17. Which mode should be used with the 'open()' function to append data to an existing file?
18. ..... and ..... are the two objects associated with the csv module to read and write onto a CSV file.
19. Whether following code create file xyz.txt or not?import java.io.*; class demoFile \{ public static void main(String args[]) \{ try \{ File f = new File("C:/java/xyz.txt"); \} catch(Exception e) \{ \} catch(IOException e) \{ \} \} \}
20. Which function is used to write multiple lines in text file?
21. What is a binary file and how does it differ from a text file?
22. What is the correct order of operations for writing data to a file?
23. EOL can be expanded as
24. Which character can work as delimiter for CSV files:
25. What happens to the content of a file when opened in 'WRITE' mode?