wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Data Structure CO5 Quiz

Total questions: 60

Worksheet time: 31mins

Name
Class
Date
1.

If the insertion and deletion happens from both the ends then the queue is called a______Queue

a)

a) Deque

b)

b) Header

c)

c) Queue

d)

d) Circular Queue

2.

Process of inserting an element in stack is called ____________

a)

Create

b)

Push

c)

Evaluation

d)

Pop

3.

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

4.

Which of the following applications may use a stack?

a)

a) A parentheses balancing program

b)

b) Tracking of local variables at run time

c)

c) Compiler Syntax Analyzer

d)

d) Data Transfer between two asynchronous process

5.

What is the value of the postfix expression 6 3 2 4 + – *:

a)

1

b)

14

c)

74

d)

-18

6.

The data structure required to check whether an expression contains balanced parenthesis is?

a)

a) Stack

b)

b) Queue

c)

c) Array

d)

d) Tree

7.

Circular Queue is also known as ________

a)

a) Ring Buffer

b)

b) Square Buffer

c)

c) Rectangle Buffer

d)

d) Curve Buffer

8.

If the elements “A”, “B”, “C” and “D” are placed in a queue and are deleted one at a time, in what order will they be removed?

a)

a) ABCD

b)

b) DCBA

c)

c) DCAB

d)

d) ABDC

9.

Linked list data structure offers considerable saving in _____________

a)

a) Computational Time

b)

b) Space Utilization

c)

c) Space Utilization and Computational Time

d)

d) Speed Utilization

10.

To represent hierarchical relationship between elements, Which data structure is suitable?

a)

Dequeue

b)

Priority

c)

Tree

d)

Graph

11.

Match the following.


a) Completeness i) How long does it take to find a solution

b) Time Complexity ii) How much memory need to perform the search.

c) Space Complexity iii) Is the strategy guaranteed to find the solution when there in one.

a)

a-iii, b-ii, c-i

b)

a-i, b-ii, c-iii

c)

a-iii, b-i, c-ii

d)

a-i, b-iii, c-ii

12.

___________ is neither an algorithm nor a program.

a)

a.Computing

b)

b.Pseudo code

c)

c.Computer science

d)

d.None of the above

13.

Efficiency of an algorithm is measured by

a)

Time and Capacity complexity

b)

Time and Space complexity

c)

Speed and Space complexity

d)

Speed and Capacity complexity

14.

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

a)

Traversing

b)

Searching

c)

Retrieval

d)

Both A and B

15.

To measure Time complexity of an algorithm Big O notation is used which:

a)

A. describes limiting behaviour of the function

b)

B. characterises a function based on growth of function

c)

C. upper bound on growth rate of the function

d)

D. all of the mentioned

16.

If for an algorithm time complexity is given by O(1) then complexityof it is:

a)

A. constant

b)

B. polynomial

c)

C. exponential

d)

D. none of the mentioned

17.

If for an algorithm time complexity is given by O(n) then complexityof it is:

a)

A. constant

b)

B. linear

c)

C. exponential

d)

D. none of the mentioned

18.

Almost all programming languages start arrays at ___

a)

index 0

b)

index 1

c)

index 2

d)

the null character

19.

In almost all programming languages, what kind of bracketing is used to denote array access?

a)

round brackets

b)

square brackets

c)

curly braces

d)

quotation marks

20.

Most often, to save a string into memory, you just put it in ___

a)

square brackets

b)

round brackets

c)

quotes

d)

curly braces

21.

A two-dimensional list, which can be thought of as an array of arrays, is called ___

a)

a matrix

b)

a struct

c)

a tree

d)

a grid

22.

A data type that can be used to group items of possibly different types into a single type is called ___

a)

a root

b)

a struct

c)

a tree

d)

a pointer

23.

A type of struct that stores a variable, like a number, and also a pointer is called ___

a)

a nodule

b)

a radix

c)

a node

d)

a root

24.

A flexible data structure that can store many nodes is called ___

a)

a tree

b)

a linked list

c)

a pointer

d)

a queue

25.

In a tree data structure, any nodes that hang from other nodes are called ___

a)

branched nodes

b)

leaf nodes

c)

children nodes

d)

daughter nodes

26.

In a tree data structure, any nodes that have no children (where the tree ends) are called ___

a)

boundary nodes

b)

leaf nodes

c)

orphan nodes

d)

terminal nodes

27.

An important property of trees is that there’s a one-way path from ___

a)

branch to branch

b)

roots to leaves

c)

parent to daughter

d)

peak to trough

28.

Which data structure is used for data that links arbitrarily, and includes things like loops?

a)

binary trees

b)

circular trees

c)

graphs

d)

dynamic linked stacks

29.

People have used the word ________ to mean computer information that is transmitted or stored.

a)

Beta

b)

Data

c)

Database

d)

None of above

30.

_____________ specifies how we enter data into our programs and what type of data we enter.

a)

data type

b)

data

c)

datum

d)

all of above

31.

In ___________ data structure data items are not in sequence.

a)

non linear

b)

linear

c)

non-homogeneous

d)

all of above

32.

____________data structures are those whose sizes and structures associated memory locations are fixed at compile time.

a)

linear

b)

homogeneous

c)

static

d)

dynamic

33.

Stack uses __________ data structure as the element that was inserted last is the first one to be taken out.

a)

LIPO

b)

FIFO

c)

LIFO

d)

FIPO

34.

Full form of LIFO is ____________

a)

Last Inside First Outside

b)

Last Innner First Outer

c)

Last In First Out

d)

Last Impact First Out

35.

Every stack has a variable _________ associated with it.

a)

TOP

b)

BOT

c)

POT

d)

none of the above

36.

_________ operation adds an element to the top of the stack.

a)

pop

b)

push

c)

peep

d)

all of the above

37.

_________ operation removes the element from the top of the stack.

a)

push

b)

pop

c)

update

d)

none of the above

38.

_________ operation returns the value of the topmost element of the stack.

a)

push

b)

pop

c)

peep

d)

update

39.

_________ operation changes the value of element given by user of the stack.

a)

push

b)

pop

c)

peep

d)

update

40.

A function calls itself is called ___________.

a)

queue

b)

recursion

c)

function

d)

none of above

41.

The elements in a queue are added at one end called ________.

a)

front

b)

rear

c)

near

d)

none of above

42.
A tree is composed of ____ connected by edges or lines.
a)
Fruit 
b)
Leaf Node
c)
Root Node
d)
Nodes
43.
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
44.

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

a)

35

b)

24

c)

42

d)

20

45.

Root

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

46.

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

47.

Binary 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)

a tree where each node can only have 2 child nodes attached to it

48.

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

49.

The decision tree structure begins at a node called the _____.

a)

span

b)

top

c)

root

d)

branch

50.

How many leaf are there in the tree?

a)

1

b)

3

c)

4

d)

7

51.
In this tree, where would the new value "7" be placed?
a)
On the left "leaf" of "4"
b)
On the right "leaf" of "6"
c)
On the left "leaf" of "15"
d)
Over the top of the current number "5"
52.

Which of these tree traversal methods is used to output the contents of a binary tree in ascending order?

a)

Pre-Order

b)

In-Order

c)

Post-Order

d)

Monastic Orders

53.

What are the 3 depth traversals for a tree data structure?

a)

Pre-, In- and Post-order

b)

Pro-, In- and Past-order

c)

Pre-, Out- and Post-order

d)

Pre-, In- and New-order

54.

A Data Structure is:

a)

A C++ vector

b)

A way of organizing, storing and performing operations on data.

c)

A function in any programming language

d)

A sequence of steps to solve a problem.

55.

Given a sequence of number below:

50,60,40,70,45,55,30,80,65,35,25,75,85


When creating a binary search tree, what is the height of the tree?

a)

3

b)

4

c)

5

d)

6

56.

Given a binary search tree, insert 27, 15, 63, 99, 70 and 85 (in this order) into the binary search tree. What is the post-order traversal?

a)

5,15,27,34,47,54,63,70,72,75,83,85,88,94,99,101

b)

72,54,34,5,27,15,47,63,70,83,75,88,85,101,94,99

c)

15,27,5,47,34,70,63,54,75,85,99,94,101,88,83,72

d)

15,27,5,47,34,63,54,70,75,85,99,94,101,88,83,72

e)

none of the above

57.
A Balanced Tree has equal number of items on each subtree.
a)
True
b)
False
58.
Root has more left descendants than the right descendants or vice versa.
a)
Balanced Tree
b)
Perfect Tree
c)
Right Tree
d)
Unbalanced Tree
59.

Choose the correct statement

a)

A data structure is a specialised format for organising and storing data

b)

A data structure is a specialised format for organising and storing information

c)

A data structure is a format for organising and storing only one data type

d)

A data structure is too complicated to truly understand or use

60.

Example of linear data structure except

a)

array

b)

tree

c)

queue

d)

stack