Test 6-9

Your page rank:

Total word count: 1243
Pages: 5

Calculate the Price

- -
275 words
Looking for Expert Opinion?
Let us have a look at your work and suggest how to improve it!
Get a Consultant

When used as a parameter, a _____
variable allows a function to access and modify the original argument passed to it.

reference

A function ____ includes the statement that make up the function

Definition

A ______ is a program module whose purpose is to test other modules by calling them

driver

A function can have _______ parameters, and it can have either zero or one return values(s).

zero to many

In the statement

cout << sqrt(22.0);

22.0 is

an argument

A _____ is a dummy function that is called instead of the actual function it represent, to test that call to and return from the function are working correctly.

stub

When more than one function has the same name they are called ______ functions.

overloaded

A(n) ______ is information that is passed to a function, and a(n) ______ is a special variable that recives and holds that information.

argument, parameter

A void function is one that

returns no values

A function _______ is a statement that causes a function to execute.

call

The value in ________ local varible is retained between function calls.

static

A _______ variable is defined inside the body of a function and is not accessable outside that function

local

Breaking a program up into a set of manageable sized functions is called _____ programming.

modular

A function _____ eliminates the need to place the function definition before all calls to the function.

prototype

Two or more functions may have the same name provided that

their parameter lists are different.

The _____ statement causes a function to end and the flow of control to move back to the point where the function call was made.

return

The _____ function causes the entire program to terminate, regardless of which function or control mechanism is

exit()

In a function call, in addition to the name of the function, you are required to furnish

a data type for each parameter and the data type of the return value, but not an indentifier name for each parameter.

In a function prototype, in addition to the name of the function, you are required to furnish

a data type for each parameter and the data type of the return value, but not an indentifier name for each parameter.

In C++ numeric global variable are _____ by default and numeric local variables are _____ by defult.

initialized to zero, not initialized

When only a copy of an argument is passed to a function, it is said to be passed

by value

A(n) _______ argument is one that is automatically passed to a parameter when the argument is left out of the function call.

default

A function can have zero to many parameters, and it can have _____ return values(s).

either zero or one

A function ______ is a statement that causes a function to execute.

call

A _____ variable is declared outside all function

global

When a function needs access to an original argument passed to it, for example in order to change its value, the argument needs to be

passed into a reference parameter

The while loop is a(n) _______ loop, whereas the do-while loop is a(n) _______ loop.

Pretest, post test

The ideal type of loop to use if you want a user to enter exactly 20 values is a(n) ______ loop.

for

To use files in a C++ program you must include the _______ header file.

fstream

A(n) _______ is a variable that is regularly incremented or decremented each time a loop iterates.

counter

A(n) _______ is a variable that controls the number of times a loop iterates.

loop control variable

A(n) _______ is a special value that marks the end of a list of values.

sentinel

The ideal type of loop to use for repeating a menu is a(n) ______ loop.

do-while

The statements in the body of a do-while loop are executed _______.

at least once

If nothing within a while loop ever causes the condition to becomes false, a(n) ______ may occur.

infinite loop

The while loop has two important parts: a condition that is tested and statement or block of statements that is executed ____________.

as long as the condition is true

____________ are C++ operators that change their operands by one.

++ and –

If a while loop has no braces around the body the loop ________________.

the loop body contains just one statement

A variable that keeps a running total of data values is called a(n) ________.

accumulator

A for loop is considered a(n) ________ loop.

pretest

The do-while loop is a(n) ________ loop, whereas the while loop is a(n) ______ loop.

post test, pretest

int grades[ ] = { 100, 90, 99, 80}; shows an example of

implicit array sizing

How many elements does the following array have?int bugs[1000];

1000

Which of the following is a valid C++ array definition?

int scores [10];

If you attempt to store data past an array’s boundaries, it is guaranteed that the compiler will issue an error

False

When you pass an array as an argument to a function, the function can modify the contents of the array

True

When writing functions that accept multi-dimensional arrays as arguments, _______________ must be explicitly stated in the parameter list

all but the first dimension

Assume array1 and array2 are the names of arrays. To assign the contents of array2 to array1, you would use the following statement:

array1 = array2;

False

An array with no elements is

illegal in C++

A two-dimensional array of characters can contain

strings of the same length

strings of different lengths

uninitialized elements

Subscript numbering in C++

begins with zero

The ______________ is automatically appended to a character array when it is initialized with a string constant

null terminator

What will the following code display?

int numbers[ ] = {99, 87, 66, 55, 101};

for (int i = 1; i < 4; i++)
cout << numbers[i] << " ";

87 66 55

Arrays may be ___________ at the time they are __________.

initialized, declared

An element of a two-dimensional array is referred to by __________ followed by ___________

the row subscript of the element, the column subscript of the element

The amount of memory used by an array depends upon the array’s data type and the number of elements in the array

True

By using the same ________ you can build relationships between data stored in two or more arrays

subscript

Unlike regular variables, these can hold multiple values.

arrays

A two-dimensional array is like ______________ put together

several identical arrays

To pass an array as an argument to a function, pass the _________ of the array

name

A two-dimensional array can have elements of _________ data type(s)

one

If an array is partially initialized, the uninitialized elements will be set to zero

True

Although two-dimensional arrays are a novel idea, there is no known way to pass one to a function

False

The statement:

double money[25.00];

is a valid C++ array definition.

False

Given the following declaration, where is 77 stored in the scores array?

Given the following declaration, where is 77 stored in the scores array? int scores[]={83, 62, 77, 97};

A(n) ____________ can be used to specify the starting values of an array

initialization list

An array can easily be stepped through by using a

for loop

Each individual element of an array can be accessed by the array name and an element number, called a subscript

True

It is __________ to pass an argument to a function that contains an individual array element, such as numbers[3]

legal in C++

The individual values contained in array are known as

elements

To assign the contents of one array to another, you must use

a loop to assign the elements of one array to the other array

Share This
Flashcard

More flashcards like this

NCLEX 10000 Integumentary Disorders

When assessing a client with partial-thickness burns over 60% of the body, which finding should the nurse report immediately? a) ...

Read more

NCLEX 300-NEURO

A client with amyotrophic lateral sclerosis (ALS) tells the nurse, "Sometimes I feel so frustrated. I can’t do anything without ...

Read more

NASM Flashcards

Which of the following is the process of getting oxygen from the environment to the tissues of the body? Diffusion ...

Read more

We can Write a Custom Essay

Consectetur labore ullamco magna do irure fugiat Lorem

Check Price

Successful message
sending