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

Quiz Instructions

Select an option to see the correct answer instantly.

1. A bunch of bytes stored on some storage device is .....
2. What does the 'break' statement do in C++?
3. Which function is used to change the file pointer position?
4. Which of the following commands can be used to read the entire contents of a file as a string using the file object ?
5. How can you handle file exceptions in Python?
6. Which module is required to use the built-in function dump()?
7. Which method returns the name of the file?
8. In Python the default mode while opening the file is .....
9. What is the correct order of attributes for a character in the text file as used in the program?
10. Explain the first-fit and best-fit memory allocation techniques.
11. Which method is used to write row by row into a csv file along with writer object?
12. What is the output of the following code?def greet(name):print("Hello, '' + name)result = greet("John")
13. Class at the top of exception class hierarchy?
14. What is a recursive function?
15. What is the difference between 'r' and 'w' file modes?
16. What does the 'os.path.relpath()' function do?
17. What letter is added to the modes "r" and "w" to allow them to access non-textual (or binary) information?
18. Java.lang.NullPointerException is a
19. Which mode should be used to add data to an existing file without deleting its contents?
20. Identify the correct syntax for opening a file
21. ..... error also known as bug or semantic error
22. FileNotFoundException
23. Select a function which is used to read a single character from a file at a time
24. What is the file extension for CSV files?
25. ..... is a location to store permanently (Secondary)in a system for future use