Answer the following statements true (T) or false (F)
1. In a sorting an array, the items in the array are rearranged so that
```
for all j and k, if j < k, then array[j]<=array[k]```
2. In the definition, double d[10] = {0.0}; only d[0] is initialized to zero,
the rest are uninitialized, just like x in the definition double x;
3. If you need an array with more than one index, you can use a multidimensional array,
which is actually an array of arrays. In the explanation, declare an array of doubles
with 2 rows and 5 columns.
4. Indexed variables for an array are stored wherever the computer finds memory for the
first indexed variable, then the next one is stored next to the first if there is space, and
someplace else if not.
5. C++ arrays check for out-of-range index values.
1. True
This is sorting into increasing order. This ignores sorting into decreasing order. Care should be taken not to compare elements with index values out of the
range 0 to declared_size-1
2. False
The ISO C++ Standard requires that a Standard compliant compiler with
an initializer list initialize the excess array elements to a zero value appropriate to the
base array type. Most compilers comply.
3. True
Perhaps the easiest way to see this is to think of a two dimensional array
as an array of lines on a page. The requested declarations is
double array[2][5];
The first index is the row, or line number, and the second index is the column position
within that row.
4. False
Indexed variables of an array are stored contiguously, or next to each
other.
5. False.
C++ array access is directly to memory through addresses, and is
designed to be as efficient as possible. The C++ Standard does not require a
mechanism to detect out-of-range index values. Finally, no version of C++ this writer
is aware of provides this feature.
You might also like to view...
To simplify entering ranges in formulas you can use
A) a cell's specific location. B) a cells relative location. C) range names. D) both an absolute and a relative cell reference.
You have chosen a font family and font size that give very good legibility, and your site is directed to people with normal vision. What is the smallest font size you would use?
What will be an ideal response?