wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Data Structures Midterm Exam WRI

Total questions: 27

Worksheet time: 2hrs 15mins

Name
Class
Date
1.

Is ultimately stored in computers as patterns of bits, though these days most programming languages deal with higher-level objects, such as characters, integers, and floating-point numbers.

a)

Array

b)

Data

c)

Array items

2.

Is a collection of similar types of data.

a)

Array

b)

Data

c)

Array items

3.

Typically stored in a sequence of computer memory locations, but to discuss them, we need a convenient way to write them down on paper.

a)

Array

b)

Data

c)

Array items

4.

Is a condition that does not change during the execution of a given program or algorithm.

a)

Loop

b)

Invariants

c)

Index

5.

Arrays work on an _________ system starting from 0 to (n-1), where n is the size of the array.

a)

Index

b)

array

c)

address

6.

Arrays are typically defined with square brackets with the size of the arrays as its argument.

a)

Curly brace

b)

Brackets

c)

Parenthesis

7.

This is a Boolean expression calculated at the beginning of each iteration to determine whether the loop body will execute or stop.

a)

Loop body

b)

Loop update

c)

Loop condition

d)

Loop initialization

8.

We initialize loop variables before starting the first iteration of the loop.

a)

Loop body

b)

Loop update

c)

Loop condition

d)

Loop initialization

9.

We perform increment/decrement operations on loop variables to control repetitions of the loop.

a)

Loop body

b)

Loop update

c)

Loop condition

d)

Loop initialization

10.

The core part of a loop where we perform required operations to manipulate data at each iteration.

a)

Loop body

b)

Loop update

c)

Loop condition

d)

Loop initialization

11.

Must be appropriately defined and true before the loop execution.

a)

Pre-condition

b)

Post-condition

c)

Loop variant

d)

Loop invariant

12.

An exit condition must be appropriately defined to ensure loop termination.

a)

Pre-condition

b)

Post-condition

c)

Loop variant

d)

Loop invariant

13.

The most critical aspect that is true before and after each iteration. The values of variables may change, but the truth of loop invariant does not vary.

a)

Pre-condition

b)

Post-condition

c)

Loop variant

d)

Loop invariant

14.

Involve virtually anything, for example, a list of integers [3, 2, 4, 2, 5], a shopping list [apples, butter, bread, cheese], or a list of web pages each containing a picture and a link to the next web page.

a)

Queues

b)

List

c)

Recursion

d)

Stacks

15.

An abstract level, equivalent to linked lists. They are the ideal data structure to model a First-In-Last-Out (FILO), or Last-In-First-Out (LIFO), strategy in search.

a)

Queues

b)

List

c)

Recursion

d)

Stacks

16.

Is a data structure used to model a First-In-First-Out (FIFO) strategy. Conceptually, we add to the end of a queue and take away elements from its front.

a)

Queues

b)

List

c)

Recursion

d)

Stacks

17.

Is a principle that allows a problem to be defined in terms of smaller and smaller instances of itself. In computing, we solve problems defined recursively by using recursive functions, which, again, are functions that call themselves.

a)

Queues

b)

List

c)

Recursion

d)

Stacks

18.

Might be useful when working with something like a list of web pages, which has each page containing a picture, a link to the previous page, and a link to the next page.

a)

Linked List

b)

Double linked list

c)

Binary Tree

19.

Contains both data and a pointer.

a)

Node

b)

Child Node

c)

Parent

20.

Has at least 1 child node, found by going up the line that connects to a specific node.

a)

Node

b)

Child Node

c)

Parent

21.

(a)   of an element is the process of removing the desired element and reorganizing it.

22.

The method of searching for a specific value in an array is known as (a)   .

23.

(a)   in an array is a process of visiting each element once.

24.

(a)   in an array is the process of including one or more elements in an array.

25.

(a)   in an array is the process in which it sorts elements in a user-defined order.

26.

Use a comma to separate your answer.

(a)  

27.

Use a comma to separate your answer.

(a)