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

Quiz Instructions

Select an option to see the correct answer instantly.

1. To read 18 characters from the file object fobj, the correct syntax is .....
2. Which function is used to read all the characters in a text file?
3. How do you read the entire content of a text file in Python?
4. Which of the follwing methods is used to write() into a file?
5. What will be the output of the following snippet?
6. What happens when file opened in 'a' mode?
7. What will the following code snippet do?F=open("abc.txt", "a")x="class12"F.write(x)F.close()
8. What happens when '1' == 1 is executed?
9. Public class Foo \{ public static void main(String[] args) \{ try \{ return; \} finally \{ System.out.println( "Finally" ); \} \} \}
10. Which exception is handled while reading binary file?
11. What does the os.makedirs() function do?
12. We can create our own error types in Python?
13. What is the correct order of operations for reading from a file in pseudocode?
14. It is necessary to always create the file in the same default folder where Python has been installed.
15. How can you check if a file exists before deleting it?
16. The full name of a file is also called .....
17. ..... function will break the link of file object and file on the disk
18. How do you handle exceptions in Python while working with files?
19. Which class can be used to read data line by line using readLine() method?
20. Can values got from forms in html be given to php
21. Which Tkinter widget is used to create clickable elements for user interaction?
22. What will be the output of add ..... two(5, 7)?
23. The correct syntax of seek() is:
24. How do you close a file after opening it?
25. Which function is used to check the file opening mode of the file?