Week 9: Monday -------------- Q1. (50) Declare an array a of integers of size 10. Input positive integers from the user until 9 integers have been input or a zero has been input. If a negative integer has been input, ignore it. Store the input integers from a[1] (not a[0]). Write a function avg that computes the average of the positive integers. Convert the average to the nearest integer by rounding it off. Store the average in a[0]. The parameters of the function avg contains only a pointer to an integer (not an array): void avg(int *p) Q2. (50) Write a recursive function that checks whether the contents of an integer array form a palindrome. Assume that the size of the array is at most 10. However, only positive integers are input. If a zero is read, input stops. Ignore negative integer inputs. An array is called a palindrome if the contents of it are the same whether it is read forward or backward. For example, the arrays 34 5 6 5 34 and 34 5 5 34 are palindromes, while the array 34 5 6 34 is not.