# Data structure/Data Structure (DS) MCQ Set 1 Sample Test,Sample questions

## Question: ` A â€¦â€¦â€¦â€¦â€¦ is an acyclic digraph, which has only one node with indegree 0, and other nodes have in-degree 1.`

1. directed tree

2.undirected tree

3.dis-joint tree

4.direction oriented tree

1.stack

2.string

3.linear array

4.queue

1.antinel

2.sentinel

1.partite

2.bipartite

3.rooted

4.bisects

## Question: ` Any node is the path from the root to the node is called`

1. successor node

2.ancestor node

3.internal node

4.None of the above

## Question: ` Arrays are best data structures â€¦â€¦â€¦â€¦`

1.for relatively permanent collections of data

2. for the size of the structure and the data in the structure are constantly changing

3.for both of above situation

4. for none of the above

## Question: ` Each array declaration need not give, implicitly or explicitly, the information about`

1. the name of array

2.the data type of array

3.. the first data from the set to be stored

4. the index set of the array

## Question: ``` fThe disadvantage in using a circular linked list is â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦. ```

1.it is possible to get into infinite loop.

2.last node points to first node

3.time consuming

4.requires more memory space

1.graphs

2.stacks

3.binary tree

4.queues

## Question: ` In a priority queue, insertion and deletion takes place at â€¦â€¦â€¦â€¦â€¦â€¦`

1.front, rear end

2.only at rear end

3.only at front end

4.any position

1.0 and 1

2.0 and -1

3.-1 and 0

4.1 and 0

## Question: ` In â€¦â€¦â€¦â€¦â€¦, search start at the beginning of the list and check every element in the list.`

1. linear search

2.binary search

3.hash search

4. binary tree search

## Question: ` In doubly linked lists`

1. a pointer is maintained to store both next and previous nodes.

2.two pointers are maintained to store next and previous nodes.

3. a pointer to self is maintained for each node.

4.none of the above

## Question: ` In doubly linked lists, traversal can be performed?`

1.only in forward direction

2.only in reverse direction

3. in both directions

4. none of the above

1.[log2n]-1

2.logn]+1

3. [log2n]

4.[log2n]+1

1.depth first

3.with first

4.depth limited

## Question: ` Linear arrays are also called â€¦â€¦â€¦â€¦â€¦â€¦.`

1. straight line array

2.one-dimensional array

3.vertical array

4.horizontal array

## Question: ` The simplest type of data structure is â€¦â€¦â€¦â€¦â€¦â€¦`

1. multidimensional array

2. linear array

3. two dimensional array

4.three dimensional array

1.o(n)

2.o(n2)

3. o(n log n)

4.o(log n)

## Question: ` What is a dequeue?`

1. a queue with insert/delete defined for both front and rear ends of the queue

2.a queue implemented with a doubly linked list

3.a queue implemented with both singly and doubly linked lists

4.a queue with insert/delete defined for front side of the queue

## Question: ` Which data structure allows deleting data elements from front and inserting at rear?`

1.stacks

2.queue

3.dequeue

4.binary search tree

1.array

2.tree

3.graphs

4.hierarchy

## Question: `A â€¦â€¦. is a data structure that organizes data similar to a line in the supermarket, where the first one in line is the first one out.`

3.both of them

4.neither of them

1. network

2.weighted graph

3. both a and b

4.none a and b

## Question: `A â€¦â€¦â€¦â€¦â€¦â€¦.. is a linear list in which insertions and deletions are made to from either end of the structure.`

1.circular queue

2.random of queue

3.priority

4.dequeue

## Question: ```A binary search tree whose left subtree and right subtree differ in hight by at most 1 unit is called â€¦â€¦ D. none of the above```

1.. avl tree

2.red-black tree

3. lemma tree

4.None of the above

## Question: `A binary search tree whose left subtree and right subtree differ in hight by at most 1 unit is called â€¦â€¦`

1. avl tree

2.red-black tree

3.lemma tree

4.None of the above

## Question: `A circular linked list can be used for`

1.stack

2.queue

3.both stack & queue

4.neither stack or queue

2.stacks

3.queue

4.dequeue

## Question: `A directed graph is â€¦â€¦â€¦â€¦â€¦â€¦. if there is a path from each vertex to every other vertex in the digraph.`

1. weakly connected

2.strongly connected

3.tightly connected

4.linearly connected

1. linear

2.non linear

4.trees

## Question: `Arrays are best data structures â€¦â€¦â€¦â€¦`

1. for relatively permanent collections of data.

2. for the size of the structure and the data in the structure are constantly changing

3.for both of above situation

4. for none of the above

1.insertion

2.deletion

3.retrieval

4.traversal

1.insertion

2.deletion

3.retrieval

4.traversal

1. unary tree

2.binary tree

3.trinary tree

4.both b and c

## Question: `â€¦â€¦. Is a pile in which items are added at one end and removed from the other.`

1.stack

2.queue

3.list

4.None of the above

1.insertion

2.deletion

3.retrieval

4.traversal

## Question: `â€¦â€¦â€¦.. level is where the model becomes compatible executable code`

1.abstract level

2.application level

3.implementation level

4.All of the above

## Question: `â€¦â€¦â€¦â€¦â€¦ is not the component of data structure.`

1.operations

2.storage structures

3.algorithms

4.None of the above

## Question: `Each node in a linked list has two pairs of â€¦â€¦â€¦â€¦.. and â€¦â€¦â€¦â€¦â€¦â€¦.`

2. link field and avail field

3.avail field and information field

## Question: `Finding the location of the element with a given value is:`

1.traversal

2.search

3.sort

4.None of the above

## Question: `How do you count the number of elements in the circular linked list?`

2. public int length(node head){int length = 0;if( head == null)return 0;node temp = head.getnext();while(temp != null){temp = temp.getnext();length++;}return length;}

## Question: `Identify the data structure which allows deletions at both ends of the list but insertion at only one end.`

1.input restricted dequeue

2.output restricted qequeue

3.output restricted qequeue

4.stack

## Question: `In a circular queue the value of r will be ..`

1.r=r+1

2.r=(r+1)% [queue_size â€“ 1]

3.r=(r+1)% queue_size

4.r=(r-1)% queue_size

1.push, pop

2. pop, push

3.insert, delete

4.delete, insert

## Question: ```node.next -> node.next.next; will make ```

1.node.next inaccessible

2.node.next.next inaccessible

3.this node inaccessible

4.None of the above

## Question: `Stack is also called as`

1.last in first out

2.first in last out

3.last in last out

4.first in first out

## Question: `Suppose a circular queue of capacity (n â€“ 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are`

1.full: (rear+1) mod n == front, empty: rear == front

2. full: (rear+1) mod n == front, empty: (front+1) mod n == rear

3. full: rear == front, empty: (rear+1) mod n == front

4.full: (front+1) mod n == rear, empty: rear == front

1.lists

3.trees

4.queues

1. queue

2.stack

3.tree

4.graph

## Question: `The disadvantage in using a circular linked list is â€¦â€¦â€¦â€¦â€¦â€¦â€¦â€¦.`

1. A. it is possible to get into infinite loop

2.last node points to first node

3. time consuming

4.requires more memory space

## Question: `The logical or mathematical model of a particular organization of data is called a â€¦â€¦â€¦`

1.data structure

2.data arrangement

3.data configuration

4.data formation

1.(n/2)+1

2.(n+1)/2

3.(n-1)/2

4.(n+2)/2

## Question: `The property of binary tree is`

1.the first subset is called left subtree

2. the second subtree is called right subtree

3. the root cannot contain null

4.the right subtree can be empty

## Question: `The term "push" and "pop" is related to the`

1. array

2.lists

3.stacks

4.all of the above

1.antinel

2.sentinel

1.dequeue

2.priority

3.tree

4.graph

## Question: `What differentiates a circular linked list from a normal linked list?`

1.you cannot have the â€˜nextâ€™ pointer point to null in a circular linked list

2. it is faster to traverse the circular linked list

3. you may or may not have the â€˜nextâ€™ pointer point to null in a circular linked list

## Question: `What will be the value of top, if there is a size of stack STACK_SIZE is 5`

1.5

2.6

3.4

4.None of the above

## Question: `When does top value of the stack changes?`

1.before deletion

2.while checking underflow

3. at the time of deletion

4. after deletion

## Question: `Which data structure allows deleting data elements from and inserting at rear?`

1. stacks

2.queues

3.dequeues

4.binary search tree

1.stack

2.queue

3.tree

4.array

1.stack

2.queue

3.tree

4.array

## Question: `Which if the following is/are the levels of implementation of data structure`

1.abstract level

2.application level

3.implementation level

4. all of the above

## Question: `Which is/are the application(s) of stack`

1.function calls

2.large number arithmetic

3. evaluation of arithmetic expressions

4.All of the above

1.graph

2.trees

3.binary tree

4.stack

1. strings

2.lists

3.stacks

4.graph

1.strings

2.lists

3.stacks

4.tree

1. linear arrays

3.graphs

4.trees

## Question: `Which of the following is an application of stack?`

1. finding factorial

2.tower of hanoi

3.infix to postfix conversion

4. all of the above

1.stacks

2.list

3.strings

4.trees

1.insertion sort

2.bubble sort

3.merge sort

4.heap sort

## Question: `Which of the following is not the part of ADT description?`

1. data

2.operations

3.both of the above

4.None of the above

## Question: `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.`

1. i-only

2. ii-only

3.both i and ii

4.None of the above

## More MCQS

##### Olete Team
Online Exam TestTop Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on Online Exam Testwebsite is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!