wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

DATASTRUCTURES-3SEM

Total questions: 25

Worksheet time: 14mins

Name
Class
Date
1.

In the __________traversal we process all of a vertex’s descendents before we move to an adjacent vertex.

a)

Depth First

b)

Breadth First

c)

With First

d)

Depth Limited

2.

The disadvantage in using a circular linked list is __________

a)

it is possible to get into infinite loop

b)

last node points to fist node.

c)

time consuming

d)

requires more memory space.

3.

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

4.

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)

False, True

c)

True, False

d)

False, False

5.

TREE[1]=NULL indicates is _____________

a)

Overflow

b)

Empty

c)

Underflow

d)

Full

6.

A terminal node in a binary tree is called __________

a)

Root

b)

Branch

c)

Child

d)

Leaf

7.

If node N is a terminal node in a binary tree then its ________

a)

Right tree is empty

b)

Left tree is empty

c)

Both left & right sub trees are empty

d)

Root node is empty

8.

Other name for directed graph is _________

a)

Direct graph

b)

Digraph

c)

Dir-graph

d)

Dgraph

9.

(a)   are used to represent networks. The networks may include paths in a city or telephone network or circuit network.

10.
A tree is composed of ____ connected by edges or lines.
a)
Fruit 
b)
Leaf Node
c)
Root Node
d)
Nodes
11.
A Kind of tree where every node in a tree can have at most two children.
a)
Binary Tree
b)
Binary Expression Tree
c)
Tree
d)
Binary Search Tree
12.

What is the value of the ROOT node in this Tree?

a)

35

b)

24

c)

42

d)

20

13.

Tree

a)

data structure similar to a graph, with no loops.

b)

an object in a graph also known as a vertex

c)

a join of relationship between nodes - also know as an arc

d)

the starting node in a rooted tree structure from which all other nodes branch off./

14.

In preorder traversal of a binary tree the second step is ____________

a)

traverse the right subtree

b)

traverse the left subtree

c)

traverse right subtree and visit the root

d)

visit the root

15.

Tree is ____data structure

a)

Linear

b)

Non linear

c)

Array

d)

List

16.

The operation of processing each element in the list is known as

a)

Sorting

b)

Merging

c)

Traversing

d)

Searching

17.

Which of the following is the infix expression?

a)

ABC+*

b)

+A*BC

c)

A+B*C

d)

None of the above

18.

#define SIZE 11

void main()

{

int stack[SIZE];

int top=-1;

}


What would be the maximum value of the top that does not cause the overflow of the stack?

a)

8

b)

9

c)

11

d)

10

19.

If the elements '1', '2', '3' and '4' are inserted in a queue, what would be the order for the removal?

a)

1324

b)

4321

c)

3241

d)

None of the above

20.

Consider the following function.

int array()

{

if(isEmpty())

return 0;

else

{

int =q[front];

front++;

return n;

}

}


Which operation does the above code perform?

a)

a. Enqueue

b)

b. Dequeue

c)

c. Return the front element

d)

d. add an element to front

e)

e. add an element to rear

21.

What will be the postfix expression for the following infix expression :

A + B * C ^ D

a)

ABCD+*^

b)

ABCD*+^

c)

ABCD^*+

d)

ABC+D*^

22.

Data in the data structures are processed by operations like insertion, deletion, sorting, merging and

a)

Traversing

b)

Searching

c)

Retrieval

d)

Updating

23.

Evaluate the following expression if the value of x=2, y=3 and z=1.

v = x + ––z + y++ +y

a)

7

b)

8

c)

9

d)

6

24.

Give the output of the following expression:

a += a++ + ++a + – –a + a– –; when a = 7

a)

31

b)

39

c)

34

d)

37

25.

Which notation is used for the following format:

Operand Operator Operand

a)

Postfix

b)

Prefix

c)

Infix

d)

None