Revised -Python File Handling & Data Structures MCQs with Answers for Class 12 CBSE | Objective Type Questions | Multiple Choice Question -2021-2022

Python Data File Handling & Data Structures MCQs with Answers for Class 12 CBSE

Hi Students i have given the Important MCQ’s with Answers of  Data File Handling and Data Structures full pdf  for Class 12 CBSE, for demo i have given few questions here and you can download Data File Handling and Data Structures full pdf | Objective Type Questions using given link below. 




MCQ-DATA FILE HANDLING: CLASS XII

1. To open a file c:\scores.txt for reading, we use

a) infile = open(“c:\scores.txt”, “r”)

b) infile = open(“c:\\scores.txt”, “r”)

c) infile = open(file = “c:\scores.txt”, “r”)

d) infile = open(file = “c:\\scores.txt”, “r”)

  • Answer: b
  • Explanation: Execute help(open) to get more details.

2. To open a file c:\scores.txt for writing, we use

a) outfile = open(“c:\scores.txt”, “w”)

b) outfile = open(“c:\\scores.txt”, “w”)

c) outfile = open(file = “c:\scores.txt”, “w”)

d) outfile = open(file = “c:\\scores.txt”, “w”)

  • Answer: b
  • Explanation: w is used to indicate that file is to be written to.

3. To open a file c:\scores.txt for appending data, we use

a) outfile = open(“c:\\scores.txt”, “a”)

b) outfile = open(“c:\\scores.txt”, “rw”)

c) outfile = open(file = “c:\scores.txt”, “w”)

d) outfile = open(file = “c:\\scores.txt”, “w”)

  • Remaining questions download link given below



MCQ-DATA STRUCTURES: CLASS XII

1. Process of inserting an element in stack is called
a) Create
b) Push
c) Evaluation
d) Pop
  • Answer: b
  • Explanation: None.

2. Process of removing an element from stack is called
a) Create
b) Push
c) Evaluation
d) Pod
  • Answer: d
  • Explanation: None.

3. In a stack, if a user tries to remove an element from empty stack it is called
a) Underflow
b) Empty collection
c) Overflow
d) Garbage Collection
  • Answer: a
  • Explanation: None.

4. Pushing an element into stack already having five elements and stack size of 5 ,
then stack becomes
a) Overflow
b) Crash
c) Underflow
d) User flow
  • Answer: a
  • Explanation: None.

5. Entries in a stack are “ordered”. What is the meaning of this statement?
a) A collection of stacks is sortable
b) Stack entries may be compared with the ‘<‘ operation
c) The entries are stored in a linked list
d) There is a Sequential entry that is one by one

Post a Comment

If you any doubts, Please let me know

Previous Post Next Post