chapter 8 programming
The last character in a C-string is always the ____.
null char
Two (or more) arrays are called _____ if their corresponding components hold related information.
parallel
In C++, arrays ____.
passed by ref only
When storing a two-dimensional array in computer memory, C++ uses the ____.
row order form
A ____ sort sorts the list by finding the smallest (or equivalently largest) element in the list and moving it to the beginning (or end) of the list.
selection
The _____ search algorithm searches a list for a given item, starting with the first element and continues to compare the item with the other elements in the list until either the item is found or the list has no more elements.
sequential
When you initialize arrays during declaration, ____.
the size is determined by the number of initial values in the braces
A ____ array is a collection of a fixed number of components arranged in rows and columns, wherein all components are of the same data type.
two-dimensional
A(n) _____ operation is any operation that manipulates the entire array as a single unit.
aggregate
A variable of type string can be converted to a null-terminated character array using the ____ function.
c_str
Functions for C-string manipulation are found in the ____ header file.
cstring
The function strcmp (s1, s2) returns ____ if s1 and s2 are the same.
0
Which of the following data types cannot be used as an array index?
double
Arrays that are created using pointers during program execution are called ____ arrays.
dynamic
C-strings are ____.
enclosed in double quote marks
Assuming arrayName is the name of an array and identifier is a name of a variable that has the same data type as the array elements, which of the follow is the correct syntax for the range-based for loop?
for (dataType identifier : arrayName) statements
Which of the following statements is TRUE?
C++ functions cannot return a value of type array.
Which of the following statements is FALSE?
When declaring a two-dimensional array as a formal parameter, you can omit the size of the first dimension or the second.
The _____ address of an array is the memory location of the first array component.
base
When you pass an array as a parameter, the ____ of the actual array is passed to the formal parameter.
base address