Give the sequence of steps for creating and using a dynamic array.
What will be an ideal response?
a) define a pointer type for pointers to variables of the type the elements are to be
```
typedef double * doublePtr’
```
b) declare a pointer variable of the defined type to point to the dynamically allocated array.
```
doublePtr a;
```
c) assign to the pointer variable the returned value from a call to new
```
a = new double[arraySize];
```
d) use as you would any array.
```
a[4] = 17.94;
```
e) before the end of the block where the pointer variable is declared, call the delete
operator with the pointer variable as argument. Note the syntax for the deletion of memory allocated as an array.
```
delete [] a;
```
You might also like to view...
VeriMed is an implantable identity chip containing the name, address, and medical conditions of the person wearing it
Indicate whether the statement is true or false
?
?As the accompanying figure illustrates, the _____ changeover method allows the new system to be implemented in stages, or modules.
A. ?phased operation B. ?parallel operation C. ?pilot operation D. ?direct cutover
You can change the color of a page by selecting the background color and foreground color tools on the ____________________ toolbar.
Fill in the blank(s) with the appropriate word(s).
____ are predesigned combinations of color and formatting attributes you can apply to a document.
A. Palettes B. Themes C. Templates D. Styles