Assignment #0: Programming in C and Pointers

The goal of this assignment is to write a global function that prompts the user to enter an unknown number of integers, and then read the integers until an invalid (non-integer) entry is detected. The numbers are stored in an array and returned. Then provide a main routine that calls your global function and prints the contents.
  1. First do this in C++, using a vector. This should be relatively easy coding.
  2. Next, examine pg 213 and Figure 11.5 to see how this would be done in C++ using the base language arrays instead of the library vector class. Observe that additional work must be done to pass to the user the number of items read, and also, arrays have to be allocated via new[] and released via delete[]. Pretty messy stuff.
  3. Rewrite the code in Figure 11.5 to use C. Make sure your source code ends in a .c suffix, so that only legal C is accepted. Among other issues, you will