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

Quiz Instructions

Select an option to see the correct answer instantly.

1. Which exception is thrown by read() method?
2. How do you create an array in PHP?
3. Di poster "Hierarki Stream File C++", mana stream untuk terminal?
4. Consider:f=open("data.txt", "r")print(f.readline(4))If file contains "Python", output will be:
5. Which of these keywords must be used to monitor for exceptions?
6. The type of operation possible in an opened file is governed by
7. Which of the following statements correctly explain the function of tell() method?
8. What is the significance of the 'b' mode in file handling?
9. A file object is also known as?
10. Which Python module helps with file path manipulations?
11. What is the output of:b=2c=2print(b is c)c +=2print(b is c)
12. What does the 'EOF()' function return when the end of a file has NOT been reached?
13. In Which file the data get stored in tabular format?
14. Which Tkinter widget is used for multi-line text input?
15. The ..... function forces the writing of data on disc stil pending in output buffer.
16. In which format Binary file contains information
17. What precautions should be taken while working with Binary File Handling in Python?
18. Which option is True, in reference to the the 'a' and 'w' mode in open()?
19. The sys.stdin is always opened in ..... mode.
20. Default file opening mode is .....
21. Which method is used to read the entire content of a text file in a single string?
22. In Python, which keyword is used to read data from a file?
23. What does remove() do?
24. Which of the following statements is/are true?
25. A structure can contain:
26. How does the 'continue' statement affect the flow of a loop in C++?
27. What is the use of the 'open()' function in file handling?
28. Apa yang dilakukan fungsi fwrite?
29. When is the finally block executed?
30. What is the purpose of the 'ofstream' class in C++?
31. The correct syntax for converting the string x to uppercase is:
32. Which of these class is highest in hierarchy in java
33. How do you open a binary file in Python?
34. Which of the following mode argument is used to truncate?
35. Can one except block handle multiple exceptions?
36. During a school project, Reyansh, Taran, and Tanisha need to save their data into a CSV file. Which method should they use to write multiple rows in one call?
37. Differentiate between a text file and a binary file in C++.
38. Why we use file handling?
39. How do you read specific columns from a CSV file using pandas?
40. Which keyword creates a structure?
41. File in python is treated as sequence of ..... ?
42. A variable defined between two functions
43. What will be the position of File pointer after executing the following command?F.seek(-10, 2)
44. What is the Output of following program#include int fun(int n){ static int s = 0; s = s + n; return (s); }int main(){ int i = 10, x; while (i > 0) { x = fun(i); i ..... ; } printf ("%d ", x); return 0; }
45. What is the purpose of the fopen() function in PHP?
46. What type of file contains only ASCII code?
47. What is the purpose of the 'F' variable in the Python file handling examples?
48. N= int(input("Please enter an integer: "))if n < 0:raise Exception (" Only Positive Numbers are Allowed ") print ("Great, you successfully entered an integer!")what is the output if the given input is-12
49. ..... is used to read and write data to a file on disk.
50. What will be the output of print(5/0)?
51. What are the two built-in functions to read a line of text from standard input, which is by default the keyboard?
52. You need to be on "r" mode in order to read from a file.
53. This method replaces a string with another string.
54. Which of the following function is used to open the file in python file handling?
55. What is the difference between a module and a package in Python?
56. What does the function add ..... two(a, b) do?
57. Assertion:Exception handling handles all types of errors and exceptions.Reasoning:Exception handling is responsible for handling anomalous situations during the execution of a program.
58. How do you open a file in Python?
59. Which mode is used to open binary file in write read mode
60. What is the main advantage of using binary files over text files?