Exercise 1: Finding Average in Array

Calculate the average value of an array by using pointers.

Problem statement

Write a findAvg function that takes a pointer to an integer array int *arr , and the array size size as arguments, calculates the average of the array, and returns the result.

Sample input