β˜‘ MCQ PRACTICE

Data Structures Unit 1

Practice objective questions for quick revision and examination preparation. Try answering each question before revealing the answer.

πŸ“š Data Structures
πŸ“– Unit 1
🎯 MCQs

Data Structures - Unit-1

1
What is a data structure?
AA programming language
BA collection of algorithms
CA way to store and organize data
DA type of computer hardware
Correct Answer A way to store and organize data
2
Which data structure is used for implementing recursion?
AStack
BQueue
CList
DArray
Correct Answer Stack
3
Which data structure is needed to convert infix notation to postfix notation?
ATree
BHashing
CStack
DQueue
Correct Answer Stack
4
What data structure would you mostly likely see in non recursive implementation of a recursive algorithm?
AStack
BLinked List
CTree
DQueue
Correct Answer Stack
5
In linked list each node contains a minimum of two fields. One field is data field to store the data second field is?
APointer to character
BPointer to integer
CPointer to node
DNode
Correct Answer Pointer to node
6
Which of these is not an application of a linked list?
ATo implement file systems
BFor separate chaining in hash-tables
CTo implement non-binary trees
DRandom Access of elements
Correct Answer Random Access of elements
7
Which of the following real world scenarios would you associate with a stack data structure?
Apiling up of chairs one above the other
Bpeople standing in a line to be serviced at a counter
Coffer services based on the priority of the customer
Dtatkal Ticket Booking in IRCTC
Correct Answer piling up of chairs one above the other
8
What does β€˜stack underflow’ refer to?
Aaccessing item from an undefined stack
Badding items to a full stack
Cremoving items from an empty stack
Dindex out of bounds exception
Correct Answer removing items from an empty stack
9
Array implementation of Stack is not dynamic, which of the following statements supports this argument?
Aspace allocation for array is fixed and cannot be changed during run-time
Buser unable to give the input for stack operations
Ca runtime exception halts execution
Dimproper program compilation
Correct Answer space allocation for array is fixed and cannot be changed during run-time
10
In linked list implementation of a queue, where does a new element be inserted?
AAt the head of link list
BAt the centre position in the link list
CAt the tail of the link list
DAt any position in the linked list
Correct Answer At the tail of the link list
11
In a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into a NONEMPTY queue?
AOnly front pointer
BOnly rear pointer
CBoth front and rear pointer
DNo pointer will be changed
Correct Answer Only rear pointer
12
In a queue, front and rear pointers are tracked. Which of these pointers will change during an insertion into EMPTY queue?
AOnly front pointer
BOnly rear pointer
CBoth front and rear pointer
DNo pointer will be changed
Correct Answer Both front and rear pointer
13
In linked list implementation of a queue, from where is the item deleted?
AAt the head of link list
BAt the centre position in the link list
CAt the tail of the link list
DNode before the tail
Correct Answer At the head of link list
14
In a queue, the important condition for a queue to be empty is?
AFRONT is null
BREAR is null
CLINK is empty
DFRONT==REAR-1
Correct Answer FRONT is null
15
The elements of a linked list are stored
AIn a structure
BIn an array
CAnywhere the computer has space for them
DIn contiguous memory locations
Correct Answer Anywhere the computer has space for them
16
The prefix form of A-B/ (C * D ^ E) is?
A-A/B*C^DE
B-A/BC*^DE
C-ABCD*^DE
D-/*^ACBDE
Correct Answer -A/B*C^DE
17
The type of expression in which operator succeeds its operands is?
AInfix Expression
BPrefix Expression
CPostfix Expression
DBoth Prefix and Postfix Expressions
Correct Answer Postfix Expression
18
In infix to postfix conversion algorithm, the operators are associated from?
Aright to left
Bleft to right
Ccentre to left
Dcentre to right
Correct Answer left to right

Fill in the Blanks

19 __________ form of access is used to add and remove nodes from a queue.
Correct Answer FIFO, First In First Out
20 New nodes are added to the __________ of the queue
Correct Answer REAR
21 The term push and pop is related to __________
Correct Answer Stacks
22 A linear list of elements in which deletion can be done from one end (front) and insertion can take place only at the other end (rear) is known as __________
Correct Answer Queue
23 A stack, if implemented using an array of size MAX_SIZE, stack gets full when __________
Correct Answer TOP = MAX_SIZE – 1
24 Convert the following infix expressions into its equivalent postfix expressions (A + B * D)/(E – F)+G __________
Correct Answer A B D * + E F – / G +
25 In a stack, if a user tries to remove an element from an empty stack it is called __________
Correct Answer Underflow
26 What is the value of the postfix expression 6 3 2 4 + – *?
Correct Answer -18
← Back to All MCQs