Title | Practice Exam 3 |
---|---|
Author | Frankisa Surani |
Course | Technical Writing |
Institution | Arkansas State University |
Pages | 34 |
File Size | 1.2 MB |
File Type | |
Total Downloads | 16 |
Total Views | 148 |
Practice Exam 3...
Question 1 0 out of 1 points
The ___ of a function is the set of statements that perform the function's operation. Response Feedback:
bod y
Question 2 0 out of 1 points
A(n) ___ variable is defined inside a function and is not accessible outside the function. Response Feedback:
loc al
Question 3 0 out of 1 points
A(n) ___ variable is defined outside all functions and is accessible to all functions in its scope. Response Feedback:
glob al
Question 4 0 out of 1 points
___ local variables exist for the lifetime of the program, even though their scope is only the function in which they are defined. Response Feedback:
stati c
Question 5 0 out of 1 points
In computer programming, ___ code is part of the source code of a program which can never be executed because there exists no control flow path to the code from the rest of the program. Response Feedback:
dead or unreachable
Question 6 0 out of 1 points
Values that are sent to a function are called [a] (a.k.a. [b]). Response Feedback:
Values that are sent to a function are called arguments (a.k.a. actual parameters).
Question 7
0 out of 1 points
A(n) ___ is a collection of statements that performs a specific task. Response Feedback:
functio n
Question 8 0 out of 1 points
A function can send a value to the part of the program that executed it. This value is called a(n) ___ value. Response Feedback:
retur n
Question 9 0 out of 1 points
___ is code that tests a function by simply calling it. Response Feedback:
driver code
Question 10 0 out of 1 points
___ arguments are passed to parameters automatically if no argument is provided in the function call. Response Feedback:
defau lt
Question 11 0 out of 1 points
In programming, a function is a named section of a program that performs a specific task. In this sense, a function is a type of [a] or [b]. Some programming languages make a distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value. Response Feedback:
In programming, a function is a named section of a program that performs a specific task. In this sense, a function is a type of procedure or subroutine. Some programming languages make a distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value.
Question 12 0 out of 1 points
A(n) ___ constant is a named constant that is available to every function in a program. Response
glob
Feedback:
al
Question 13 0 out of 1 points
A function ___ is a statement that causes a function to execute. Response Feedback:
cal l
Question 14 0 out of 1 points
Enclosing a group of statements inside a set of braces creates a(n) ___. Response Feedback:
code block
Question 15 0 out of 1 points
The list of parameters indicated in the function definition are called ___ parameters. Response Feedback:
form al
Question 16 0 out of 1 points
A(n) ___ is a collection of precompiled routines that a program can use. Response Feedback:
librar y
Question 17 0 out of 1 points
___ involves writing and testing small portions of a program repeatedly until the program is complete. Response Feedback:
incremental development
Question 18 0 out of 1 points
Variables that are defined inside a function are called ___ variables. Response Feedback:
loc
al
Question 19 0 out of 1 points
A(n) ___ function is a function that does not return a value to the part of the program that executed it. Response Feedback:
voi d
Question 20 0 out of 1 points
The very first line of a function definition is the function ___. Response Feedback:
head er
Question 21 0 out of 1 points
A function ___ contains the interface to the function as well as the statements that make up the function. Response Feedback:
definitio n
Question 22 0 out of 1 points
A(n) ___ is a special variable that holds a value being passed into a function. Response Feedback:
paramet er
Question 23 0 out of 1 points
Instead of writing one long program that contains all of the statements necessary to solve a problem, several small functions that each solve a specific part of the problem can be written. A program of this type is called a(n) ___ program. Response Feedback:
modul ar
Question 24 0 out of 1 points
A(n) ___ is a programming construct that allows a programmer to associate a given set
of instructions with a specific name. Response Feedback:
function, procedure or subroutine
Question 25 0 out of 1 points
When a copy of an argument is passed to a function, it is said to be ___. Response Feedback:
passed by value
Question 26 0 out of 1 points
A(n) ___ is a package of code that is meant to be reused by many programs. Response Feedback:
librar y
Question 27 0 out of 1 points
A(n) ___ is a dummy function that is called instead of the actual function it represents. It usually displays a test message acknowledging that it was called, and nothing more. Response Feedback:
stu b
Question 28 0 out of 1 points
Function ___ is a programming concept that allows programmers to define two or more functions with the same name as long as each of the functions has a unique signature. Response Feedback:
overloadi ng
Question 29 0 out of 1 points
A function ___ eliminates the need to place a function definition before all calls to the function. Response Feedback:
prototyp e
Question 30 0 out of 1 points
The order in which statements are executed in a program is referred to as the program's ___. Response Feedback:
flow of execution
Question 1 0 out of 1 points
The very first line of a function definition is the function ___. Response Feedback:
head er
Question 2 0 out of 1 points
Instead of writing one long program that contains all of the statements necessary to solve a problem, several small functions that each solve a specific part of the problem can be written. A program of this type is called a(n) ___ program. Response Feedback:
modul ar
Question 3 0 out of 1 points
A(n) ___ is a programming construct that allows a programmer to associate a given set of instructions with a specific name. Response Feedback:
function, procedure or subroutine
Question 4 0 out of 1 points
When a copy of an argument is passed to a function, it is said to be ___. Response Feedback:
passed by value
Question 5 0 out of 1 points
When a reference variable is used as a parameter, it is said that the argument is ___. Response Feedback:
passed by reference
Question 6 0 out of 1 points
Function ___ is a programming concept that allows programmers to define two or more functions with the same name as long as each of the functions has a unique signature. Response Feedback:
overloadi ng
Question 7 0 out of 1 points
___ local variables exist for the lifetime of the program, even though their scope is only the function in which they are defined. Response Feedback:
stati c
Question 8 0 out of 1 points
A(n) ___ is a dummy function that is called instead of the actual function it represents. It usually displays a test message acknowledging that it was called, and nothing more. Response Feedback:
stu b
Question 9 0 out of 1 points
___ is code that tests a function by simply calling it. Response Feedback:
driver code
Question 10 0 out of 1 points
The list of parameters indicated in the function definition are called ___ parameters. Response
form
Feedback:
al
Question 11 0 out of 1 points
A(n) ___ is a collection of statements that performs a specific task. Response Feedback:
functio n
Question 12 0 out of 1 points
A(n) ___ variable is defined outside all functions and is accessible to all functions in its scope. Response Feedback:
glob al
Question 13 0 out of 1 points
A function can send a value to the part of the program that executed it. This value is called a(n) ___ value. Response Feedback:
retur n
Question 14 0 out of 1 points
The ___ of a function is the set of statements that perform the function's operation. Response Feedback:
bod y
Question 15 0 out of 1 points
A(n) ___ is a special variable that holds a value being passed into a function. Response Feedback:
paramet er
Question 16 0 out of 1 points
In programming, a function is a named section of a program that performs a specific task. In this sense, a function is a type of [a] or [b]. Some programming languages make a distinction between a function, which returns a value, and a
procedure, which performs some operation but does not return a value. Response Feedback :
In programming, a function is a named section of a program that performs a specific task. In this sense, a function is a type of procedure or subroutine. Some programming languages make a distinction between a function, which returns a value, and a procedure, which performs some operation but does not return a value.
Question 17 0 out of 1 points
A(n) ___ constant is a named constant that is available to every function in a program. Response Feedback:
glob al
Question 18 0 out of 1 points
Enclosing a group of statements inside a set of braces creates a(n) ___. Response Feedback:
code block
Question 19 0 out of 1 points
The order in which statements are executed in a program is referred to as the program's ___. Response Feedback:
flow of execution
Question 20 0 out of 1 points
A function ___ eliminates the need to place a function definition before all calls to the function. Response Feedback:
prototyp e
Question 21 0 out of 1 points
Values that are sent to a function are called [a] (a.k.a. [b]). Response Feedback:
Values that are sent to a function are called arguments (a.k.a. actual parameters).
Question 22 0 out of 1 points
___ arguments are passed to parameters automatically if no argument is provided in the function call. Response Feedback:
defau lt
Question 23 0 out of 1 points
In computer programming, ___ code is part of the source code of a program which can never be executed because there exists no control flow path to the code from the rest of the program. Response Feedback:
dead or unreachable
Question 24 0 out of 1 points
A(n) ___ variable is defined inside a function and is not accessible outside the function. Response Feedback:
loc al
Question 25 0 out of 1 points
A(n) ___ is a package of code that is meant to be reused by many programs. Response Feedback:
librar y
Question 26 0 out of 1 points
Variables that are defined inside a function that remain in memory after the function has finished executing are called ___ variables. Response Feedback:
stati c
Question 27 0 out of 1 points
A function ___ contains the interface to the function as well as the statements that make up the function. Response Feedback:
definitio
n
Question 28 0 out of 1 points
A function ___ is a statement that causes a function to execute. Response Feedback:
cal l
Question 29 0 out of 1 points
A(n) ___ function is a function that does not return a value to the part of the program that executed it. Response Feedback:
voi d
Question 30 0 out of 1 points
___ involves writing and testing small portions of a program repeatedly until the program is complete. Response Feedback:
incremental development
Question 31 0 out of 1 points
When used as parameters, ___ variables allow a function to access the parameter's original argument. Changes to the parameter are also made to the argument. Response Feedback:
referen ce
Question 32 0 out of 1 points
Variables that are defined inside a function are called ___ variables. Response Feedback:
loc al
Question 33 0 out of 1 points
A(n) ___ is a collection of precompiled routines that a program can use.
Response Feedback:
librar y
Question 1 0 out of 1 points
A(n) [a] and a(n) [b] each work like a variable that can store a group of values. Response Feedback:
An array and a vector each work like a variable that can store a group of values.
Question 2 0 out of 1 points
The data types that are defined in the STL are commonly called ___ because they store and organize data. Response Feedback:
containe rs
Question 3 0 out of 1 points
To determine the number of values that may currently be stored in a vector, use the ___ member function. Response Feedback:
capacity ()
Question 4 0 out of 1 points
To completely delete the contents of a vector, use the ___ member function. Response Feedback:
clear( )
Question 5 0 out of 1 points
A(n) ___ indicates how many values an array can store. Response Feedback:
size declarator
Question 6 0 out of 1 points
C++ does not perform array ___. This means you can write programs with subscripts that go beyond the boundaries of a particular array. Response Feedback:
bounds checking
Question 7 0 out of 1 points
The ___ is a collection of data types and algorithms that you may use in your programs. These data types and algorithms are programmer-defined. They are not part of the C++ language, but were created in addition to the built-in data types. Response Feedback:
Standard Template Library
Question 8 0 out of 1 points
Data in a standard C++ array is accessible only via the ___. Response Feedback:
subscript operator
Question 9 0 out of 1 points
The ___ member function accepts a value as an argument and stores that value after the last element in the vector. Response Feedback:
push_bac k()
Question 10 0 out of 1 points
The ___ member function increases the number of values that a vector may store by the number indicated by its first argument. Response Feedback:
resize ()
Question 11 0 out of 1 points
To retrieve the value of an element in a vector, use the ___ member function. Response Feedback:
at( )
Question 12 0 out of 1 points
A(n) ___ allows you to store and work with multiple values of the same data type. The number of values to be stored must be specified at declaration. Response Feedback:
arra y
Question 13 0 out of 1 points
A(n) ___ holds a sequence of values stored in contiguous memory locations. The number of values to be stored does not have to be specified when declared and if data is added when the data structure is full, its size will be increased to accommodate the new value automatically. Response Feedback:
vect or
Question 14 0 out of 1 points
A(n) ___ is an STL object that behaves like a pointer (a variable that "points" to some piece of data that is stored in the computer's memory). It is used to access the individual data elements in a container. Response Feedback:
iterat or
Question 15 0 out of 1 points
A(n) ___ will receive the value of a different container element during each iteration of a range-based for loop. During the first loop iteration, it receives the value of the first element; during the second iteration, it receives the value of the second element, and so forth. Response Feedback:
range variable
Question 16 0 out of 1 points
A(n) ___, or index, is used to pinpoint a specific location within an array. Response Feedback:
subscri pt
Question 17 0 out of 1 points
Data in a vector may be directly retrieved using an index by implementing the [a] (dangerous and should be avoided) or the [b] member function. Response Feedback:
Data in a vector may be directly retrieved via the subscript operator or the at() member function.
Question 18 0 out of 1 points
The ___ is a loop that iterates once for each element in a container. Each time the loop iterates, it copies an element from the container to a variable. Response Feedback:
range-based for loop
Question 19 0 out of 1 points
One specific error, demonstrated in the code below, regarding array bounds is known as the ___. const int SIZE = 3; int values[SIZE]; for (int i = 0; i...