4. Write a function to add the first n elements of an \texttt{int} array \texttt{a} and returns the sum. Using C++
5. Write a function that returns the position of the first match of a search argument \texttt{v} in an \texttt{int} array \texttt{a} of length N. Return -1 if no match. Using C++
6. Write a function whose header is \texttt{int replacement(int key, int r, int list[], int N)}, and whose purpose to search a given list to find and replace all occurrences of \texttt{key} with the value \texttt{r}. If no replacements were made it should return 0; otherwise, it should return the count on the number of replacements made; for example: Using C++
\texttt{int a[]} = \{23, 23, 55, 8, 23\};
\texttt{int c} = replacement(23, 99, a, 5);
After execution: c = 3 and a[] = \{99, 99, 55, 8, 99\}
7. Write a function that prints all elements of an integer array of length N, with no more than 10 integers displayed per line. Using C++