wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Computer Programming Midterms

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

Is a software design technique that emphasizes separating the

functionality of a program into independent, interchangeable modules,

a)

Modular Software

b)

Modular Function

c)

Modular Programming

d)

Function Programming

2.

Breaking a complex problem into smaller parts, each of these parts of a program is referred to as a _____

a)

Void Function

b)

Function

c)

Module

d)

Modular Function

3.

Each module represents a _____ that contains series of statements that carry out a task.

a)

Void Function

b)

Function

c)

Module

d)

Modular Function

4.

- Known as library functions are provided and already defined in C++.

- These are included in the header files like, for instance, <iostream> in which data types and other input/output functions are defined.

a)

Built-in Functions

b)

User-Defined Functions

5.

are functions defined and created by the programmer that performs a specific task. These must be declared and defined before being used the same as variables.

a)

Built-in Functions

b)

User-Defined Functions

6.

contains the code for a function

a)

Function Definition

b)

Function Call

c)

Function Declaration

d)

Function Body

e)

Function Header

7.

is made up of three parts: the return type, the function name, and the formal parameter list.

A semicolon is NOT used at the end

a)

Function Definition

b)

Function Call

c)

Function Declaration

d)

Function Body

e)

Function Header

8.

contains the local declarations and the function statements.

a)

Function Definition

b)

Function Call

c)

Function Declaration

d)

Function Body

e)

Function Header

9.

consists of the name, return type, and types of parameters of the functions.

a)

Function Definition

b)

Function Call

c)

Function Declaration

d)

Function Body

e)

Function Header

10.

performs a defined task, and when its return statement is executed or when its function-ending closing brace is reached, it returns the program control back to the main program.

a)

Function Definition

b)

Function Call

c)

Function Declaration

d)

Function Body

e)

Function Header

11.

variables that are declared inside a function.

a)

Local Variable

b)

Global Variable

12.

created by declaring them outside of any function.

a)

Local Variable

b)

Global Variable

13.

These functions return the value of a specific data type using the return statement.

a)

Value-returning Function

b)

Void Type/Void Function

14.

These functions do not return a value to the calling function. Thus, they are not used (called) in an expression.

a)

Value-returning Function

b)

Void Type/Void Function

15.

A function may return a value. The _____ of the function is the data type of the value the function returns.

a)

Modular Function Type

b)

Return Type

c)

Void Type

d)

Data Type

16.

refer to the type and identifier, and arguments are the values passed to

the function.

a)

Function Identifier

b)

Function Parameter

c)

Function Return

d)

Void Function

17.

These are variables found in the function call whose values will be passed to the formal parameters of the called function.

a)

Actual Parameters

b)

Formal Parameters

18.

These are the variables found in the function header that will receive values from the actual parameters.

a)

Actual Parameters

b)

Formal Parameters

19.

Are used to store multiple values in a single variable, instead of declaring separate variables for each value.

a)

Integer

b)

Variable

c)

Array

d)

String

20.

A _____ is a container (storage area) to hold data.

a)

Integer

b)

String

c)

Variable

d)

Array

21.

Are data used for representing fixed values.

a)

Array

b)

C++ Variables

c)

C++ Literals

d)

C++ Function

22.

A numeric literal (associated with numbers) without any fraction or exponent.

a)

Double

b)

Integer

c)

String

d)

Characters

e)

Floating Point

23.

Is created by enclosing a single character inside single quotation marks

a)

Double

b)

Integer

c)

String

d)

Characters

e)

Floating Point

24.

Is a sequence of characters enclosed in double-quotation marks

a)

Double

b)

Integer

c)

String

d)

Characters

e)

Floating Point

25.

The + operator can be used between strings to add them together to make a

new string.

a)

String Concatenation

b)

String Length

c)

Access String