Access the latest CBSE Class 12 Computer Science File Handling Worksheet Set B. We have provided free printable Class 12 Computer Science worksheets in PDF format, specifically designed for File Handling. These practice sets are prepared by expert teachers following the 2025-26 syllabus and exam patterns issued by CBSE, NCERT, and KVS.
File Handling Computer Science Practice Worksheet for Class 12
Students should use these Class 12 Computer Science chapter-wise worksheets for daily practice to improve their conceptual understanding. This detailed test papers include important questions and solutions for File Handling, to help you prepare for school tests and final examination. Regular practice of these Class 12 Computer Science questions will help improve your problem-solving speed and exam accuracy for the 2026 session.
Download Class 12 Computer Science File Handling Worksheet PDF
Question. Which function is used to change the position of the File Handle to a given specific position.
a) seek()
b) read()
c) tail()
d) write()
Answer : A
Question. How do you change the file position to an offset value from the start?
a) fp.seek(offset, 0)
b) fp.seek(offset, 1)
c) fp.seek(offset, 2)
d) none of the mentioned
Answer : A
Question. Which is the correct statement with respect of seek() function?
a) 0: sets the reference point at the beginning of the file
b) 1: sets the reference point at the current file position
c) 2: sets the reference point at the end of the file
d) All of these
Answer : D
Question. Which of the following statements correctly explain the function of seek() method?
a) tell the current position within the file.
b) indicate that the next read or write occurs from that position in a file.
c) determine if you can move the file position or not.
d) move the current file position to a different location at a defined offset.
Answer : D
Question. What does the <readlines()> method returns?
a) str
b) a list of lines
c) list of single characters
d) list of integers
Answer : B
Question. Which of the following functions can be used to check if a file “logo” exists?
a) os.path.isFile(logo)
b) os.path.exists(logo)
c) os.path.isfile(logo)
d) os.isFile(logo)
Answer : C
Question. Seek() function with negative offset only works when file is opened in ——– mode.
a) read mode
b) write mode
c) binary mode
d) All of these
Answer : C
Question. What happens if no arguments are passed to the seek function?
a) file position is set to the start of file
b) file position is set to the end of file
c) file position remains unchanged
d) error
Answer : D
Question. What is the use of seek() method in files()?
a) sets the file’s current position at the offset
b) sets the file’s previous position at the offset
c) sets the file’s current position within the file
d) none of the mentioned
Answer : A
Question. To read the next line of the file from a file object fobj, we use:
a) fobj.read(2)
b) fobj.read()
c) fobj.readline()
d) fobj.readlines()
Answer : C
Question. Which of the following commands can be used to read “n” number of characters from a file using the file object <file>?
a) file.read(n)
b) n = file.read()
c) file.readline(n)
d) file.readlines()
Answer : A
Question. What is the use of seek() method in files?
a) sets the file‟s current position at the offset
b) sets the file‟s previous position at the offset
c) sets the file‟s current position within the file
d) none of the mentioned
Answer : A
Question. Which of the following statements correctly explain the function of tell() method?
a) tells the current position within the file.
b) indicates that the next read or write will occur at that many bytes from the beginning of the file.
c) move the current file position to a different location.
d) it changes the file position only if allowed to do so else returns an error.
Answer : A, B
Question. Which of the following command is used to open a file “c:\temp.txt” in append-mode?
a) outfile = open(“c:/temp.txt”, “a”)
b) outfile = open(“c:\\temp.txt”, “rw”)
c) outfile = open(“c:\temp.txt”, “w+”)
d) outfile = open(“c:\\temp.txt”, “r+”)
Answer : A
Question. How do you get the current position within the file?
a) fp.seek()
b) fp.tell()
c) fp.loc
d) fp.pos
Answer : B
Question. Which of the following command is used to open a file “c:\temp.txt” in read-mode only?
a) infile = open(“c:\temp.txt”, “r”)
b) infile = open(“c:\\temp.txt”, “r”)
c) infile = open(file = “c:\temp.txt”, “r+”)
d) infile = open(file = “c:\\temp.txt”, “r+”)
Answer : B
Question. If we open the file in read mode then the initial value of tell() is
a) -1
b) 0
c) 1
d) End of the file
Answer : A
Question. What happens if no arguments are passed to the seek function?
a) file position is set to the start of file
b) file position is set to the end of file
c) file position remains unchanged
d) error
Answer : D
Please click on below link to download CBSE Class 12 Computer Science File Handling Worksheet Set B
| CBSE Class 12 Computer Science Boolean Algebra Worksheet |
| CBSE Class 12 Computer Science C++ Worksheet Set A |
| CBSE Class 12 Computer Science C++ Worksheet Set B |
| CBSE Class 12 Computer Science Classes And Objects Worksheet |
| CBSE Class 12 Computer Science Communication Technology Worksheet |
| CBSE Class 12 Computer Science Data Base Concept Worksheet |
| CBSE Class 12 Computer Science Data File Handling Worksheet |
| CBSE Class 12 Computer Science File Handling Worksheet Set A |
| CBSE Class 12 Computer Science File Handling Worksheet Set B |
| CBSE Class 12 Computer Science File Handling Worksheet Set C |
| CBSE Class 12 Computer Science Function In Python Program Worksheet |
| CBSE Class 12 Computer Science Functions Worksheet Set A |
| CBSE Class 12 Computer Science Functions Worksheet Set B |
| CBSE Class 12 Computer Science Implementation of Queue Worksheet Set A |
| CBSE Class 12 Computer Science Implementation of Queue Worksheet Set B |
| CBSE Class 12 Computer Science Implementation of Stack Worksheet |
| CBSE Class 12 Computer Science Inheritance Worksheet Set A |
| CBSE Class 12 Computer Science Inheritance Worksheet Set B |
| CBSE Class 12 Computer Science Sql Worksheet Set A |
| CBSE Class 12 Computer Science Sql Worksheet Set B |
| CBSE Class 12 Computer Science Using Python Libraries Worksheet |
Important Practice Resources for Class 12 Computer Science
File Handling CBSE Class 12 Computer Science Worksheet
Students can use the File Handling practice sheet provided above to prepare for their upcoming school tests. This solved questions and answers follow the latest CBSE syllabus for Class 12 Computer Science. You can easily download the PDF format and solve these questions every day to improve your marks. Our expert teachers have made these from the most important topics that are always asked in your exams to help you get more marks in exams.
NCERT Based Questions and Solutions for File Handling
Our expert team has used the official NCERT book for Class 12 Computer Science to create this practice material for students. After solving the questions our teachers have also suggested to study the NCERT solutions which will help you to understand the best way to solve problems in Computer Science. You can get all this study material for free on studiestoday.com.
Extra Practice for Computer Science
To get the best results in Class 12, students should try the Computer Science MCQ Test for this chapter. We have also provided printable assignments for Class 12 Computer Science on our website. Regular practice will help you feel more confident and get higher marks in CBSE examinations.
You can download the CBSE Practice worksheets for Class 12 Computer Science File Handling for the latest session from StudiesToday.com
Yes, the Practice worksheets issued for File Handling Class 12 Computer Science have been made available here for the latest academic session
There is no charge for the Practice worksheets for Class 12 CBSE Computer Science File Handling you can download everything free
Regular revision of practice worksheets given on studiestoday for Class 12 subject Computer Science File Handling can help you to score better marks in exams
Yes, studiestoday.com provides all the latest Class 12 Computer Science File Handling test practice sheets with answers based on the latest books for the current academic session
