Welcome to Section_2

C++ - stackArray

This program allocated (stored) an array on the stack. When an array is created on the stack, it cannot change size. This program basically asked the user ten times for a number that would be put into a spot in the array. The first time a number is entered, it into the first spot of the array, the second time the second spot, and so it goes. This was a relatively easy program to do. in the array.

C++ - heapArray

When allocating on the heap, arrays can exponentially change their sizes. This allows the user to decide the size of the array they are given. This program first asks the user to type in the size of the array they want. Then, just like in the last program, the user types in the numbers that they want into the array. This was also a very easy program.

See the heapArray code

See index page