This quiz works best with JavaScript enabled. Home > Class 11 > Class 11 Computer Science Chapter 6 File Handling – Quiz 39 🏠 Homepage 📘 Download PDF Books 📕 Premium PDF Books Class 11 Computer Science Chapter 6 File Handling Quiz 39 (25 MCQs) Quiz Instructions Select an option to see the correct answer instantly. 1. What must be provided to the 'open()' function to successfully open a file? A) The file's size. B) The file's creation date. C) The file's name including its file extension. D) The file's read/write speed. Show Answer Correct Answer: C) The file's name including its file extension. 2. What is the purpose of the delimiter in CSV files? A) To format the text in bold. B) To add color to the file. C) To separate individual fields or columns within each row. D) To encrypt the data. Show Answer Correct Answer: C) To separate individual fields or columns within each row. 3. It opens the file for a write. A) Ios::ate. B) Ios::in. C) Ios::out. D) Ios::app. E) Ios::trunc. Show Answer Correct Answer: C) Ios::out. 4. What are the advantages of using segmentation over paging? A) Segmentation requires less overhead for memory allocation. B) Segmentation offers better memory utilization, easier management of variable-sized data, and allows for sharing of segments. C) Paging simplifies the process of data sharing between processes. D) Paging allows for faster access to data blocks. Show Answer Correct Answer: B) Segmentation offers better memory utilization, easier management of variable-sized data, and allows for sharing of segments. 5. What is the default mode to open a text file? A) R. B) W. C) A. D) R+. Show Answer Correct Answer: A) R. 6. What is an exception A) Error occurred during the execution of a program. B) Bug occurred during the compile time of a program. C) Simply an Error. D) It is related to input values. Show Answer Correct Answer: A) Error occurred during the execution of a program. 7. Which one of the following methods is used to recuperating prepared statements resources? A) Final(). B) End(). C) Finish(). D) Close(). Show Answer Correct Answer: D) Close(). 8. The main goal of file handling in python is- A) To save program codes. B) To store state of the program. C) To save program related data. D) None. Show Answer Correct Answer: C) To save program related data. 9. Expand TSV A) Tab seprated values. B) Time seprated values. C) Tab sequence values. D) Time sequence value. Show Answer Correct Answer: A) Tab seprated values. 10. What does the 'Path()' function in the pathlib module do? A) Creates a new file. B) Joins file paths using the correct separators. C) Deletes a file. D) Reads the contents of a file. Show Answer Correct Answer: B) Joins file paths using the correct separators. 11. Which method is used to close a file? A) End(). B) Close(). C) Finish(). D) Stop(). Show Answer Correct Answer: B) Close(). 12. What data type must be used when reading or writing lines in a text file? A) INTEGER. B) FLOAT. C) STRING. D) BOOLEAN. Show Answer Correct Answer: C) STRING. 13. What is the first step in handling files in C++? A) Closing the file. B) Writing to the file. C) Reading the file. D) Opening the file. Show Answer Correct Answer: D) Opening the file. 14. How to create our own exception A) Using 'throw' keyword. B) Using 'throws' keyword. C) Using 'finally' keyword. D) Using 'throwable' keyword. Show Answer Correct Answer: A) Using 'throw' keyword. 15. This method returns an integer that specifies the current position of the file object (file pointer). A) Seek(). B) Load(). C) Position(). D) Tell(). Show Answer Correct Answer: D) Tell(). 16. The ..... device print to display. A) Stdout. B) Stdin. C) Stderr. D) None of this. Show Answer Correct Answer: A) Stdout. 17. 'a' mode adds new data to the end of a file A) TRUE. B) FALSE. C) All the above. D) None of the above. Show Answer Correct Answer: A) TRUE. 18. To read the entire contents of a text file as a string from a file object fobj, the correct syntax is ..... A) Fobj.read(). B) Fobj.read(all). C) Fobj.readlines(). D) Fobj.readline(18). Show Answer Correct Answer: A) Fobj.read(). 19. Apa yang dimaksud dengan "file handling" ? A) Proses menghapus file. B) Proses mengelola dan memanipulasi data dalam file. C) Proses membaca data dari memori. D) Proses menulis data ke layar. Show Answer Correct Answer: B) Proses mengelola dan memanipulasi data dalam file. 20. This Function write data in the file in the form of list A) Writelist(). B) Writeline(). C) Writelines(). D) Write(). Show Answer Correct Answer: C) Writelines(). 21. Storing the data in binary files is called . A) Pickling. B) Unpickling. C) Both a and b. D) None. Show Answer Correct Answer: A) Pickling. 22. How do you use file streams in C++? A) By including the header and using the read and write functions. B) By including the header and using classes like ifstream for input and ofstream for output. C) By using the header and the cin and cout objects. D) By using the header and the fopen and fclose functions. Show Answer Correct Answer: B) By including the header and using classes like ifstream for input and ofstream for output. 23. Processing of Text file is faster than binary files.(T/F) A) True. B) False. C) All the above. D) None of the above. Show Answer Correct Answer: B) False. 24. How do you create a new file using the File class in Java? A) File.addNewFile(). B) File.createFile(). C) File.makeNewFile(). D) File.createNewFile(). Show Answer Correct Answer: D) File.createNewFile(). 25. What is a text file? A) A file that contains only formatted information. B) A file with images and videos. C) A file used exclusively for Python programming. D) A file that has only information in it without any formatting. Show Answer Correct Answer: D) A file that has only information in it without any formatting. ← PreviousNext →Related QuizzesClass 11 Computer Science Chapter 6 File Handling Quiz 1Class 11 Computer Science Chapter 6 File Handling Quiz 2Class 11 Computer Science Chapter 6 File Handling Quiz 3Class 11 Computer Science Chapter 6 File Handling Quiz 4Class 11 Computer Science Chapter 6 File Handling Quiz 5Class 11 Computer Science Chapter 6 File Handling Quiz 6Class 11 Computer Science Chapter 6 File Handling Quiz 7Class 11 Computer Science Chapter 6 File Handling Quiz 8Class 11 Computer Science Chapter 6 File Handling Quiz 9Class 11 Computer Science Chapter 6 File Handling Quiz 10 🏠 Back to Homepage 📘 Download PDF Books 📕 Premium PDF Books