wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Quiz on Data Structures

Total questions: 53

Worksheet time: 53mins

Name
Class
Date
1.

What do you call a collection of items stored at contiguous memory locations?

a)

Linked List

b)

Linear List

c)

Array

d)

Data Structure

2.

Which of the following are examples of Data Structures?

a)

Linear List

b)

Linked List

c)

Stacks

d)

Trees

e)

Pseudocodes

3.

A (a)   is a linear data structure, in which elements are not stored at contiguous memory locations.

4.

What does LIFO stand for?

a)

Last In First Out

b)

Least In Flow Out

c)

Last In Flow Out

d)

Last In First Object

5.

Why do we need to organize data in a computer? Check all possible answers.

a)

You will easily direct someone to access a file for you.

b)

You will easily update back-ups or switch computers.

c)

You will always know where to find what you need.

d)

You will never waste time where to save anything.

6.

What do you this data structure classification in which the elements are stored/accessed on a non-linear order such as trees and graphs.

a)

trees

b)

linear

c)

non-linear

d)

graphs

7.

How do you call this special function that is used to map a given value with a particular key for faster access of elements?

a)

merge

b)

sorted array

c)

hash

d)

bubble

8.

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

9.

In linked list, the elements are using (a)   to linked the data item to the next address in memory location.

10.

Queue is using the order called FIFO while stack follows the order of LIFO or (a)   .

11.

Which data structure is a non-linear data structure?

a)

Stack

b)

Graphs

c)

Linked list

d)

Queue

12.

If the array is already sorted, then the running time for merge sort is: ?

a)

O(1)

b)

O(nlogn)

c)

O(n)

d)

O(n^2)

13.

Example of linear data structure except

a)

array

b)

tree

c)

queue

d)

stack

14.
_________________ is a collection of elements used to store the same type of data.
a)
Array
b)
Switch
c)
Case
d)
Loop
15.

Which of these data structures is LIFO?

a)

Stack

b)

Queue

c)

Binary Tree

d)

Double linked list

16.

int nums[ ] =

{2, 3, 5, 8, 9, 11};

How would you access the fourth element in nums

a)

nums[8]

b)

nums[3]

c)

nums(4)

d)

nums(3)

17.
Which of the following is NOT a Type of Data Structures?
a)
Arrays
b)
Tables
c)
Stacks
d)
Trees
18.
Storage for data defined in terms of set of operations to be performed on the data 
a)
Arrays
b)
Variables
c)
Abstract Data Types
d)
Algorithms
19.

A FIFO structure implemented as a ring where the front and rear pointers can wrap around the end of the start of the array.

a)

Linear Queue

b)

Circular Queue

c)

Priority Queue

20.

It use pointer to link nodes.

a)

Variable

b)

Link List

c)

Pointer

d)

Trees

21.
What kind of Data structure would you expect to find utilised to store operations in a CPU?
a)
Stack
b)
Queue
c)
List
d)
Tree
22.

LIFO stands for

a)

List of Outputs

b)

Last in First Out

c)

First in Last Out

d)

None of them

23.

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

24.

Which of the following is/are the levels of implementation of data structure

a)

Abstract level

b)

Application level

c)

Implementation level

d)

All of the above

25.

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

a)

Dequeue

b)

Priority

c)

Tree

d)

Graph

26.

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

27.

___________ is neither an algorithm nor a program.

a)

a.Computing

b)

b.Pseudo code

c)

c.Computer science

d)

d.None of the above

28.

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

29.

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

30.

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

31.

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

32.

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

33.

The worst case occurs in linear search algorithm when ______________________

a)

Item is not in the array at all

b)

Item is somewhere in the middle of the array

c)

Item is the last element in the array or item is not there at all

d)

Item is the last element in the array

34.

Recognize the algorithm that does not divide the list.

a)

Merge sort

b)

Binary Search

c)

Linear Search

d)

Quick sort

35.

The data type keyword NOT supported in C Language is:

a)

double

b)

pointer

c)

union

d)

enum

36.

What is the range of floating point number in C ?

a)

1.7 e -38 to 1.7 e +38

b)

3.4 e -38 to 3.4 e +38

c)

1.7 e -308 to 1.7 e +308

d)

3.4 e -308 to 3.4 e +308

37.

Under which data structure category does the Stack fall?

a)

Homogeneous

b)

Built-in

c)

Non linear

d)

Linear

38.

Which of these in NOT a linear data structure?

a)

Tree

b)

Stack

c)

Array

d)

Queue

39.

The data structure which expands and shrinks as per demand is called:

a)

Array

b)

Dynamic

c)

Linked list

d)

Non-linear

40.

The operation to arrange all elements in required order is called:

a)

Search

b)

Insertion

c)

Sorting

d)

Merging

41.

State the meaning of "void" keyword:

a)

No statement

b)

No function

c)

No program

d)

No value

42.

What is the range?

a)

average

b)

greatest-least

c)

the middle #

d)

# happening the most

43.

Which of the following operator can be used to access value at address stored in a pointer variable?

a)

*

b)

&

c)

->

d)

.

44.

What will be the output produced by the following C code?

a)

0

b)

1

c)

-1

d)

Compile error

45.

Assume int is 2 bytes, char is 1 byte and float is 4 bytes. Also, assume that the pointer size is 4 bytes. Predict the output.

a)

1 2 4

b)

1 4 4

c)

4 4 4

d)

None of the above

46.

Predict the output of the following code.

a)

1

b)

2

c)

3

d)

Compile error

47.

What is the output of the following program?

a)

1

b)

2

c)

3

d)

Compile error

48.

What is the output of the following program?

a)

Hi

b)

Hello

c)

HiHello

d)

Compile error

49.

What is the output of the following program?

a)

0

b)

1

c)

2

d)

Compile error

50.

What is the output of the following code snippet?

a)

15

b)

Garbage value

c)

Run-time error

d)

Compile-time error

51.

What is the output of the below code snippet?

a)

Infinite loop

b)

Prints “Hello” once

c)

No output

d)

Compile error

52.

What is the output of following program?

a)

0

b)

1

c)

2

d)

3

53.

Guess the output?

a)

3

b)

-4

c)

4

d)

Compile error