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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What happens if you try to read from a file that doesn't exist?
2. Which of the following class is used to read characters from a file?
3. When would you use the Load function in Python?
4. Both "w" mode and "a" mode can be used to edit a file.
5. What does the OPENFILE command do in file handling?
6. If I want to add to the end of a text file, I should:
7. Jika kita ingin menghapus isi lama saat membuka file, kita memakai apa?
8. Which method is used to delete a file in Java?
9. The PHP ..... function is used to open a file.
10. What will be the output of the following C code? (Assuming size of char = 1, int = 4, double = 8) #include union utemp \{ int a; double b; char c; \}u; int main() \{ u.c = 'A'; u.a = 1; printf("%zu", sizeof(u)); \}
11. Differentiate between Absolute Path and Relative Path in file handling.
12. What is Java serialization?
13. What type of storage is a file typically stored in?
14. What does the "" operator do when used with a function parameter in Python?
15. What does 'a+' means in file handling?
16. Where is data typically stored to ensure it is external to the program's main data?
17. Spaces, tabs, new lines are the example of .....
18. What method is used to check if a file exists?
19. It opens the file for a read.
20. Which Is data type of file pointer is .....
21. What will be the output of the following Python code?def getMonth(m):if m <1 or m>12:raise ValueError("Invalid")print(m)getMonth(6)
22. The ..... function removes the given character from trailing right ends.
23. What happens if the data in the text file is not in the expected format?
24. Which is/are the basic I/O (input-output) stream(s) in files?
25. Class IT\{static public void main(String ..... args)\{String s=null;System.out.println("length is:"+s.length());\}\}