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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What does the createNewFile() method return if the file is successfully created?
2. What is the purpose of the 'for loop' in Python file handling?
3. What is serialization in the context of binary files?
4. Apa yang dilakukan fscanf?
5. Which of the following file types allows to store large data files in the computer memory?
6. What is used to remove the newline character when reading from a file?
7. What is the function of 'seek()' in file handling?
8. If you will have to store marks of 10 students then which python datatype will you use?
9. What is the purpose of 'fileP.write(str(i) + '' ")' in the loop?
10. Which class is used to write text to a file in Java?
11. Which header file must be included to use file I/O operations in C++?
12. Which of the following file types is typically a text file?
13. Which superglobal variable holds information about headers, paths, and script locations?
14. Which function is used to read the data from a binary file?
15. How can you read binary data from a file?
16. What is the parent class of All Exceptions in JAVA
17. If a file exists, then it deletes the file content prior to its opening.
18. How can you move the file pointer to the beginning of a file?
19. What is the purpose of the 'flush()' method when working with files?
20. SequenceInputStream class is used to read data from .....
21. Which is an advantage of CSV over text file?
22. What will this line of code do?myFile = open("test ..... scores.txt", "w")
23. Which of these class is not a member class of java.io package?
24. Why should you avoid closing a file according to the document?
25. Which option is correct about this program? f=open( "ss.txt" , "wb" ) print( "Name of the file:" , f.name) f.flush() f.close()
26. Text file store information in ..... character
27. Which of the following modes is used for both writing and reading from a binary file?
28. Which function is used to open a file for reading in Python?
29. What does this code do?file.write ( "Jumanji" )
30. Those values are called as Default values:
31. What does the "r" mode do when opening a file in Python?
32. Which statement will read 5 characters from a file(file object 'f')?
33. How many parameters used to pass while opening a file?
34. What is a 'file handle' in the context of opening a file?
35. How do you write a list of strings to a file in Python?
36. What happens to the cursor after 'readline()' is called?
37. How do you write to a file in append mode?
38. What does strip() function do?
39. Given "myFile" is a file handle-what best describes what the following Python code does:for aLine in myFile:print(aLine)
40. What is a library in python?
41. What are the main differences between paging and segmentation?
42. What is data dependency?
43. Which of the statement is not true regarding the opening mode of a file?
44. What role does a cursor play in file handling?
45. What is pickling?
46. If a text file pointer is at the end after reading, which function resets it to the beginning?
47. What is the main focus of the practical implementation section?
48. Overwrites existing data, starting from the beginning of the file. File is created if it doesn't already exist.
49. Which of the statements is used to import all names from a module into the current calling module
50. Which of the following keyword not only belong to exception handling (It's under common keyword)
51. Apa yang dilakukan perror dalam program C?
52. What are the different file modes in Python?
53. Which symbols are used to open and close a list?
54. What method would you use to write multiple lines to a file at once?
55. What is the purpose of the EOF character in a file?
56. The difference between r+ and w+ modes is expressed as?
57. What does the program that performs file position and seek operations do?
58. Choose the CORRECT exceptionString department="JTMK"; Integer no=Integer.parseInt(department);
59. The reason for using pointers in a C program is
60. What is the output of the following code?file = open('data.txt', 'w')file.write('Hello, World!')file.close()