Often we don't know the size of an array at complie time. When this occurs, we need to create an array on the heap. The following video will show you how.
Review Questions
The following are examples of questions similar to what you can expect to see on the next exam.
- What does creating an array on the heap return? A pointer to the beginning of the array.
- When would you create an array on the heap? When you don't know the size of the array at compile time.