# Data Structures and Algorithms Multiple Choice Questions:- Part Two

1. In a queue, the initial values of front pointer f rare pointer r should be …….. and ……….. respectively.

A) 0 and 1
B) 0 and -1
C) -1 and 0
D) 1 and 0

Ans:- (B) 0 and -1

2. In a circular queue the value of r will be ..

A) r=r+1
B) r=(r+1)% [QUEUE_SIZE – 1]
C) r=(r+1)% QUEUE_SIZE
D) r=(r-1)% QUEUE_SIZE

Ans:- (C) r=(r+1)% QUEUE_SIZE

3. Which of the following statement is true?
i) Using singly linked lists and circular list, it is not possible to traverse the list backwards.
ii) To find the predecessor, it is required to traverse the list from the first node in case of singly linked list.

A) i-only
B) ii-only
C) Both i and ii
D) None of both

Ans:- (C) Both i and ii

4. The advantage of …………….. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists.

A) Lists
C) Trees
D) Queues

5. What will be the value of top, if there is a size of stack STACK_SIZE is 5

A) 5
B) 6
C) 4
D) None

Ans:- (C) 4

6. ………… is not the operation that can be performed on queue.

A) Insertion
B) Deletion
C) Retrieval
D) Traversal

Ans:- (D) Traversal

7. is an extra element at the head of the list called a ……….

A) Antinel
B) Sentinel

Ans:- (B) Sentinel

8. A graph is a collection of nodes, called ………. And line segments called arcs or ……….. that connect pair of nodes.

A) vertices, edges
B) edges, vertices
C) vertices, paths
D) graph node, edges

Ans:- (A) vertices, edges

9. A ……….. is a graph that has weights of costs associated with its edges.

A) Network
B) Weighted graph
C) Both A and B
D) None A and B

Ans:- (C) Both A and B

10. In general, the binary search method needs no more than ……………. comparisons.

A) [log2n]-1
B) [logn]+1
C) [log2n]
D) [log2n]+1

Ans:- (D) [log2n]+1

11. Which of the following is not the type of queue?

A) Ordinary queue
B) Single ended queue
C) Circular queue
D) Priority queue

Ans;- (B) Single ended queue

12. The property of binary tree is

A) The first subset is called left subtree
B) The second subtree is called right subtree
C) The root cannot contain NULL
D) The right subtree can be empty

Ans:- (D) The right subtree can be empty

13. State true or false.
i) The degree of root node is always zero.
ii) Nodes that are not root and not leaf are called as internal nodes.

A) True, True
B) True, False
C) False, True
D) False, False

Ans:- (C) False, True

14. Any node is the path from the root to the node is called

A) Successor node
B) Ancestor node
C) Internal node
D) None of the above

An:- (B) Ancestor node

15. State true of false.
i) A node is a parent if it has successor nodes.
ii) A node is child node if out degree is one.

A) True, True
B) True, False
C) False, True
D) False, False

Ans:- (B) True, False

16. ………………. is not an operation performed on linear list
a) Insertion b) Deletion c) Retrieval d) Traversal

A) only a,b and c
B) only a and b
C) All of the above
D) None of the above

Ans:- (D) None of the above

17. Which is/are the application(s) of stack

A) Function calls
B) Large number Arithmetic
C) Evaluation of arithmetic expressions
D) All of the above

Ans:- (D) All of the above

18. A …………… is an acyclic digraph, which has only one node with indegree 0, and other nodes have in-degree 1.

A) Directed tree
B) Undirected tree
C) Dis-joint tree
D) Direction oriented tree

Ans:- (A) Directed tree

19. …………………. Is a directed tree in which outdegree of each node is less than or equal to two

A) Unary tree
B) Binary tree
C) Trinary tree
D) Both B and C

Ans:- (B) Binary tree

20. State true or false.
i) An empty tree is also a binary tree.
ii) In strictly binary tree, the out-degree of every node is either o or
2.

A) True, False
B) False, True
C) True, True
D) False, False

Ans:- (C) True, True

21. Which of the following data structures are indexed structures?

A) Linear arrays
C) Queue
D) Stack

Ans:- (A) Linear arrays

22. Which of the following data structure store the homogeneous data elements?

A) Arrays
B) Records
C) Pointers
D) Lists

Ans:- (B) Records

23. When new data are to be inserted into a data structure, but there is not available space; this situation is usually called ….

A) Underflow
B) overflow
C) houseful
D) saturated

Ans:- (B) overflow

24. A data structure where elements can be added or removed at either end but not in the middle is called …

B) stacks
C) queues
D) dequeue

Ans:- (D) dequeue

25. Operations on a data structure may be …..

A) creation
B) destruction
C) selection
D) all of the above

Ans:- (D) all of the above

26. The way in which the data item or items are logically related defines …..

A) storage structure
B) data structure
C) data relationship
D) data operation

Ans:- (B) data structure

27. Which of the following are the operations applicable an primitive data structures?

A) create
B) destroy
C) update
D) all of the above

Ans:- (D) all of the above

28. The use of pointers to refer elements of a data structure in which elements are logically adjacent is ….

A) pointers
C) stack
D) queue

29. Arrays are best data structures

A) for relatively permanent collections of data
B) for the size of the structure and the data in the structure are constantly changing
C) for both of above situation
D) for non of above situation

Ans:- (A) for relatively permanent collections of data

30. Which of the following statement is false?

A) Arrays are dense lists and static data structure.
B) Data elements in linked list need not be stored in adjacent space in memory
C) Pointers store the next data element of a list.
D) Linked lists are collection of the nodes that contain information part and next pointer.

Ans:- (C) Pointers store the next data element of a list.