Question: 1. (TCO 1) How do you create a dynamic array on the heap? cout < < Enter array size: ; int size = 0; cin
1. (TCO 1) How do you create a dynamic array on the heap?
cout << "Enter array size: "; int size = 0; cin >> size; _____ // creates dynamic array
| a. | int numbers[size]; |
| b. | int numbers = new int[size]; |
| c. | int* numbers = new int[size]; |
| d. | new array = int[size];
|
2. (CO 1) Use the delete operator on pointers when you _____.
| a. | want to rename the pointer reference |
| b. | did not correctly initialize the pointer |
| c. | created the pointer using the new operator |
| d. | want to create a ternary operator
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
