Read and download free pdf of CBSE Class 12 Computer Science File Handling Worksheet Set B. Download printable Computer Science Class 12 Worksheets in pdf format, CBSE Class 12 Computer Science File Handling Worksheet has been prepared as per the latest syllabus and exam pattern issued by CBSE, NCERT and KVS. Also download free pdf Computer Science Class 12 Assignments and practice them daily to get better marks in tests and exams for Class 12. Free chapter wise worksheets with answers have been designed by Class 12 teachers as per latest examination pattern
File Handling Computer Science Worksheet for Class 12
Class 12 Computer Science students should refer to the following printable worksheet in Pdf in Class 12. This test paper with questions and solutions for Class 12 Computer Science will be very useful for tests and exams and help you to score better marks
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
File Handling CBSE Class 12 Computer Science Worksheet
The above practice worksheet for File Handling has been designed as per the current syllabus for Class 12 Computer Science released by CBSE. Students studying in Class 12 can easily download in Pdf format and practice the questions and answers given in the above practice worksheet for Class 12 Computer Science on a daily basis. All the latest practice worksheets with solutions have been developed for Computer Science by referring to the most important and regularly asked topics that the students should learn and practice to get better scores in their examinations. Studiestoday is the best portal for Printable Worksheets for Class 12 Computer Science students to get all the latest study material free of cost. Teachers of studiestoday have referred to the NCERT book for Class 12 Computer Science to develop the Computer Science Class 12 worksheet. After solving the questions given in the practice sheet which have been developed as per the latest course books also refer to the NCERT solutions for Class 12 Computer Science designed by our teachers. After solving these you should also refer to Class 12 Computer Science MCQ Test for the same chapter. We have also provided a lot of other Worksheets for Class 12 Computer Science which you can use to further make yourself better in Computer Science.
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