Lab: Passing Arrays

This is a graded lab worth 10 pts. You may work in pairs to complete this, but each person must place their code in the lab8 dropbox on D2L by midnight.

  1. Write a function named "fill" that gets numbers from the user and places them into the array formal parameter that is passed by reference. The function should return the size of the array
  2. Write a main program that includes:
    
    const int MAX=100;
    int main()
    {
       int size;
       double theArray[MAX];
    
       size=fill (theArray);
       cout << "The array consist of " << size << " numbers.\n";
    
       return 0;
    }
    
    
  3. If you would like to test your function, write a function outputArray that prints the array elements one per line. Add the following line to main
    outputArray(theArray, size);
  4. Write a function search that accepts the array, its size by value AND the integer to be searched for.
    The function should either print "FOUND" or "NOT FOUND:
  5. Place a copy of the text of the solution in the lab8 dropbox