/* Starter file for assignment 5 * Two functions are provided. You will write the 5 specified functions, * as well as a menu program to test the functions. * * */ #include void PrintArray (const int arr[], const int size); void FillArray(int arr[], const int size); /* Add your own function prototypes here */ int main() { /* We'll set the test size to 15. Use this constant in your calls * instead of the literal 15. Then, by changing this line, you can * easily test arrays of different sizes. */ const int MAXSIZE = 15; /* Declare your array and write the menu loop */ return 0; } // end main() /* Add in the definitions of your own 5 functions */ /* Definitions of PrintArray and FillArray below * Written by Bob Myers for cgs3408 */ void PrintArray(const int arr[], const int size) // this function prints the contents of the array { int i; // loop counter printf("\nThe array:\n { "); for (i = 0; i < size-1; i++) // print all but last item printf("%d, ", arr[i]); printf("%d }\n", arr[size-1]); // print last item } void FillArray(int arr[], const int size) // this function loads the contents of the array with user-entered values { int i; // loop counter printf("Please enter %d integers to load into the array\n> ", size); for (i = 0; i < size; i++) scanf("%d", &arr[i]); // enter data into array slot }