CUET-UG SERIES
Computer-science

File Handling

4 previous year questions.

Volume: 4 Ques
Yield: Medium

High-Yield Trend

1
2025
2
2024
1
2023

Chapter Questions
4 MCQs

01
PYQ 2023
medium
computer-science ID: cuet-ug-
02
PYQ 2024
medium
computer-science ID: cuet-ug-

Arrange the following in correct order of exception handling in python:
(A) Write the code that may raise an exception inside a try block
(B) Execute some code regardless of whether the exception occurs or not using the finally block
(C) Handle the specific exception using the except block
(D) Raise the exception using the raise statement if necessary
Choose the correct answer from the options given below:

1
(A), (B), (C), (D)
2
(A), (C), (B), (D)
3
(B), (A), (D), (C)
4
(C), (B), (D), (A)
03
PYQ 2024
medium
computer-science ID: cuet-ug-
Match List-I with List-II:
List-IList-II
(A) f.seek(-10,1)(I) From beginning of file, move 10 bytes forward
(B) f.seek(10,1)(II) From current position, move 10 bytes backward
(C) f.seek(10)(III) From current position, move 10 bytes forward
(D) f.seek(-10,2)(IV) From end of the file, move 10 bytes backward
1
(A) - (I), (B) - (II), (C) - (III), (D) - (IV)
2
(A) - (II), (B) - (III), (C) - (IV), (D) - (I)
3
(A) - (III), (B) - (II), (C) - (IV), (D) - (I)
4
(A) - (II), (B) - (III), (C) - (I), (D) - (IV)