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 AnswerA way to store and organize data
2
Which data structure is used for implementing recursion?
AStack
BQueue
CList
DArray
Correct AnswerStack
3
Which data structure is needed to convert infix notation to postfix notation?
ATree
BHashing
CStack
DQueue
Correct AnswerStack
4
What data structure would you mostly likely see in non recursive implementation of a recursive algorithm?
AStack
BLinked List
CTree
DQueue
Correct AnswerStack
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 AnswerPointer 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 AnswerRandom 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 Answerpiling 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 Answerremoving 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 Answerspace 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 AnswerAt 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 AnswerOnly 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 AnswerBoth 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 AnswerAt 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 AnswerFRONT 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 AnswerAnywhere 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 AnswerPostfix 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 Answerleft to right
Fill in the Blanks
19
__________ form of access is used to add and remove nodes from a queue.
Correct AnswerFIFO, First In First Out
20
New nodes are added to the __________ of the queue
Correct AnswerREAR
21
The term push and pop is related to __________
Correct AnswerStacks
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 AnswerQueue
23
A stack, if implemented using an array of size MAX_SIZE, stack gets full when __________
Correct AnswerTOP = MAX_SIZE β 1
24
Convert the following infix expressions into its equivalent postfix expressions (A + B * D)/(E β F)+G __________
Correct AnswerA 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 AnswerUnderflow
26
What is the value of the postfix expression 6 3 2 4 + β *?