Chapter 7 Arrays
When defining a parameter variable to hold a single-deminsional array argument, you do not have to include the size declarator.
TRUE
You can write programs that use invalid subscripts for an array.
TRUE
You cannot use the ___ operator to copy data from one array to another in a single statement.
=
C++ has no array _________ checking, which means you can inadvertently store data past the end of an array.
Bounds
An array's size declarator can be either a literal, a named constant, or a variable.
FALSE
Arrays cannot be initialized when they are defined. A loop or other means must be used.
FALSE
If an array is partially initialized, the uninitialized elements will contain "garbage".
FALSE
The contents of an array element cannot be displayed with cout.
FALSE
The first size declarator in the declaration of a two- dimensional array represents the number of columns. The second size declarator represents the number of rows.
FALSE
The uninitialized elements of a string array will automatically be set to the value "0".
FALSE
Two-dimensional arrays may be passed to functions, but the row size must be specified in the definition of the parameter variable.
FALSE
When an array name is used without brackets and a subscript, it is seen as the value of the first element in the array.
FALSE
Starting values for an array may be specified with a(n) _________ list.
Initialization
If the size declarator of an array definition is omitted, C++ counts the number of items in the _________ to determine how large the array should be.
Initialization list
To pass an array to a function, pass the _____ of the array.
Name
The size declarator must be a(n) _________ with a value greater than _________.
integer, 0
The ______ indicates the number of elements, or values, an array can hold.
Size declarator
By using the same ______ for multiple arrays, you can build relationships between the data stored in the arrays.
Subscript
Each element of an array is accessed and indexed by a number known as a(n) _______.
Subscript
If an array is partially initialized, the uninitialized elements will be set to _____.
0
Subscript numbering in C++ always starts with a _____.
0
Any time the name of an array is used without brackets and a subscript, it is seen as _________.
Address
If you leave an element uninitialized, you do not have to leave all the ones that follow it uninitialized.
FALSE
If you leave out the size declarator of an array definition, you do not have to include an initialization list.
FALSE
The first element of an array is accessed by the subscript 1.
FALSE
**** A two- demensional array is like several identical arrays put together.
TRUE
**Subscript numbers may be stored in variables.
TRUE
C++ allows you to create arrays with three or more dimensions.
TRUE
C++ allows you to partially initialized an array.
TRUE
Its best to think of two-dimensional arrays as having rows and columns.
TRUE
The individual elements of an array are accessed and indexed by unique numbers.
TRUE
The subscript of the last element in a single- dimension array is one less than the total number of elements in the array.
TRUE
The values in an initialization list are stored in the array in the order that they appear in the list.
TRUE
To calculate the amount of memory used by an array, multiply the number of elements by the number of bytes each element uses.
TRUE
To pass an array to a function, pass the name of the array.
TRUE
When an array is passed to a function, the function has access to the original array.
TRUE
You cannot use the assignment operator to copy one array's contents to another in a single statement.
TRUE
Its best to think of a two-dimensional array as having _________ and _________.
rows, columns
The number inside the brackets of an array definition is the _____________, but the number inside an array's brackets in an assignment statement, or any other statement that works with the contents of the array, is the __________.
size declarator, subscript