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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which stream used to read data from a source, it may be a file, an array, peripheral device or socket?
2. What is the output of the length() method if the file is empty?
3. Which is called as Direct Access?
4. Predict the output of above program. Assume that the size of an integer is 4 bytes and size of character is 1 byte. Also assume that there is no alignment needed.union test\{ int x; char arr[4]; int y;\};int main()\{ union test t; t.x = 0; t.arr[1] ='G'; printf("%s", t.arr); return 0;\}
5. A class which is capable of creating files, writing to files, reading from data files is called
6. Which mode is taken as default mode for opening a File in Python?
7. Which of the following method is used to read from file?
8. The output of executing string.ascii ..... letters can also be achieved by:
9. Which Python keyword is used to handle exceptions?
10. Which Tkinter component is used to manage the arrangement of widgets?
11. During a class project, Reyansh and Tanisha were discussing how to handle data files. They wondered what the default delimiter is when using the csv module in Python.
12. Which method is used to write multiple lines to a file?
13. Sequential Access will be slower when compared to random access? State True or False
14. Which file mode ensures new data is always added at end without overwriting?
15. Mana yang berarti menulis ke file?
16. What does the 'os.rmdir()' function do?
17. Which of the following is a valid way to check if a path exists?
18. ..... files are used to store binary data(machine code) such as images, video and audio files
19. Identify the error in the following code. 1. f = open ("workfile.txt', 'r+') 2. f.write('0123456789abcdef') 3. f.write('xyz8466') 4. f.close() 5. f.seek (0) 6. f.read()
20. What should you do if the data read from the file does not match the search criteria?
21. Which function is used to dynamically allocate memory in C?
22. The unexpected event happened during program execution should be handled by
23. What are the types of files mentioned in the lesson plan?
24. List and describe different types of directory structures.
25. How do you convert user input to a float safely?