NEW
Font size
WorksheetsComputer Programming Midterms
Total questions: 25
Worksheet time: 13mins
Is a software design technique that emphasizes separating the
functionality of a program into independent, interchangeable modules,
Modular Software
Modular Function
Modular Programming
Function Programming
Breaking a complex problem into smaller parts, each of these parts of a program is referred to as a _____
Void Function
Function
Module
Modular Function
Each module represents a _____ that contains series of statements that carry out a task.
Void Function
Function
Module
Modular Function
- 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.
Built-in Functions
User-Defined Functions
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.
Built-in Functions
User-Defined Functions
contains the code for a function
Function Definition
Function Call
Function Declaration
Function Body
Function Header
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
Function Definition
Function Call
Function Declaration
Function Body
Function Header
contains the local declarations and the function statements.
Function Definition
Function Call
Function Declaration
Function Body
Function Header
consists of the name, return type, and types of parameters of the functions.
Function Definition
Function Call
Function Declaration
Function Body
Function Header
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.
Function Definition
Function Call
Function Declaration
Function Body
Function Header
variables that are declared inside a function.
Local Variable
Global Variable
created by declaring them outside of any function.
Local Variable
Global Variable
These functions return the value of a specific data type using the return statement.
Value-returning Function
Void Type/Void Function
These functions do not return a value to the calling function. Thus, they are not used (called) in an expression.
Value-returning Function
Void Type/Void Function
A function may return a value. The _____ of the function is the data type of the value the function returns.
Modular Function Type
Return Type
Void Type
Data Type
refer to the type and identifier, and arguments are the values passed to
the function.
Function Identifier
Function Parameter
Function Return
Void Function
These are variables found in the function call whose values will be passed to the formal parameters of the called function.
Actual Parameters
Formal Parameters
These are the variables found in the function header that will receive values from the actual parameters.
Actual Parameters
Formal Parameters
Are used to store multiple values in a single variable, instead of declaring separate variables for each value.
Integer
Variable
Array
String
A _____ is a container (storage area) to hold data.
Integer
String
Variable
Array
Are data used for representing fixed values.
Array
C++ Variables
C++ Literals
C++ Function
A numeric literal (associated with numbers) without any fraction or exponent.
Double
Integer
String
Characters
Floating Point
Is created by enclosing a single character inside single quotation marks
Double
Integer
String
Characters
Floating Point
Is a sequence of characters enclosed in double-quotation marks
Double
Integer
String
Characters
Floating Point
The + operator can be used between strings to add them together to make a
new string.
String Concatenation
String Length
Access String
