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

Quiz Instructions

Select an option to see the correct answer instantly.

1. What is the purpose of the 'writeline' function?
2. Which statement is true regarding the use of loops in file handling?
3. Which of the following statementscorrectly explain the function of seek() method?
4. What is the extension for binary files?
5. Class IT\{static public void main(String ..... args)\{int k=Integer.parseInt(args[0]);System.out.println(k);\}\}if args[0]="gec" then what type of exception is thrown by the above program.
6. Which function is used to move pointer to a specific byte?
7. What is the difference between reading and writing to a file?
8. Pointer to structure uses:
9. What is the Binary file mode for the Description read and write?
10. What happens if you use fopen("newfile.txt", "w") on a non-existing file?
11. What will be the output of the following C code? #include int main() \{ FILE *fp = stdout; int n; fprintf(fp, "%d ", 45); fflush(stdout); fprintf(stderr, "%d", 65); return 0; \}
12. ..... is the inverse of Pickling where a byte stream is converted into an object hierarchy.
13. Which of the following is not a known file type?
14. What is a file path?
15. What type of file access jumps directly to any piece of data in a file without reading the data that came before it?
16. How do you change the file position to an offset value from the start?
17. Which of the following is a step in file handling?
18. What will be the output of the following code snippet?f=open('xyz.txt', 'r')x=f.read()f.close()print(x)
19. What is the output of the following code?def func(a, b=10, c=20):return a + b + cresult = func(5, c=15)print(result)
20. What command can you use to send back data from a function?
21. Koju metodu koristimo za zatvaranje streama preko objekta file u C++?
22. Which method in the csv module is used to write a single row to a csv file?
23. Which function is used to open a file in C++ for reading or writing?
24. What does the 'W' parameter signify in the 'open' command when opening a file in Python?
25. Which module is used to serialize objects in Python?