Data structures - MCQ -I

 

DATA STRUCTURES – MCQ

 

1. 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

 

2. In a stack, if a user tries to remove an element from an empty stack it is called _________
a) Underflow
b) Empty collection
c) Overflow
d) Garbage Collection

 

3. Which of the following is not the application of stack?
a) A parentheses balancing program
b) Tracking of local variables at run time
c) Compiler Syntax Analyzer

d) Data Transfer between two asynchronous process

 

4. In a circular queue, how do you increment the rear end of the queue?
a) rear++
b) (rear+1) % CAPACITY
c) (rear % CAPACITY)+1
d) rear–

 

5. In linked list each node contains a minimum of two fields. One field is data field to store the data second field is?
a) Pointer to character
b) Pointer to integer
c) Pointer to node
d) Node

 

6. Linked list is considered as an example of ___________ type of memory allocation.
a) Dynamic
b) Static
c) Compile time
d) Heap

 

7. In Linked List implementation, a node carries information regarding ___________
a) Data
b) Link
c) Data and Link
d) Node

 

8. Which of the following is false about a doubly linked list?
a) We can navigate in both the directions
b) It requires more space than a singly linked list
c) The insertion and deletion of a node take a bit longer
d) Implementing a doubly linked list is easier than singly linked list

 

9. Which of these is not an application of a linked list?
a) To implement file systems
b) For separate chaining in hash-tables
c) To implement non-binary trees
d) Random Access of elements

 

10. In linked list implementation of a queue, from where is the item deleted?
a) At the head of link list
b) At the centre position in the link list
c) At the tail of the link list
d) Node before the tai

 

11.What is the postfix expression for the corresponding infix expression?

a+b*c+(d*e)

a) abc*+de*+
b) abc+*de*+
c) a+bc*de+*
d) abc*+(de)*+

 

12. The leaves of an expression tree always contain?
a) operators
b) operands
c) null
d) expression

 

13. The expression obtained by recursively producing a left expression, followed by an operator, followed by recursively producing a right expression is called?
a) prefix expression
b) infix expression
c) postfix expression
d) paranthesized expression

14. What is the postfix expression for the following expression tree?



a) abcde++**
b) ab+cde+**
c) abc+de+**
d) abcd+*e+*

 

15. In an expression tree algorithm, what happens when an operand is encountered?
a) create one node pointing to a stack
b) pop the nodes from the stack
c) clear stack
d) merge all the nodes

Comments

Popular posts from this blog

Backtracking - N-Queens Problem, Sum of Subsets, Graph Colouring, Hamiltonian Cycle

Divide and Conquer Technique - Binary Search, Quick Sort, Merge Sort

GRAPH THEORY