Find the error(s) in each of the following statements:

```
a) Assume that a is an array of three ints.
cout << a[1] << " " << a[2] << " " << a[3] << endl;
b) array f{1.1, 10.01, 100.001, 1000.0001};
c) Assume that d is an array of doubles with two rows and 10 columns.

```


a) a[3] is not a valid location in the array. a[2] is the last valid location.
b) Too many initializers in the initializer list. Only 1, 2, or 3 values may be provided in the initializer list.
d[1, 9] = 2.345;
c) Incorrect syntax array element access. d[1][9] is the correct syntax.

Computer Science & Information Technology

You might also like to view...

The table styles and color categories available are the same for all themes

Indicate whether the statement is true or false

Computer Science & Information Technology

Answer the following statement(s) true (T) or false (F)

1. One important consideration when working with counters is the speed or frequency with which an input device is sending the false-to-true signals to the controller. 2. The count up counter counts from 0 up to a predetermined value, called the accumulated value. 3. Count up counters have three status bits: enable, done, and underflow. 4. It is possible for a counter to continue to count past the preset value. 5. When using the CTD counter, the reset instruction is typically used to put a 0 into the accumulated value when resetting the counter.

Computer Science & Information Technology

The wildcard character that searches for a single character is ____.

A. _ B. 1 C. * D. ?

Computer Science & Information Technology

A commercial Internet hosting facility advertises that it has “N+2” HVAC systems. This means:

a. One more HVAC unit than is needed to provide cooling to the entire facility b. Two more HVAC units than are needed to provide cooling to the entire facility c. Spare parts on-hand for two HVAC units d. Twice the HVAC capacity than is needed to provide cooling to the entire facility

Computer Science & Information Technology