Exercise 1: Finding Average in Array
Let's calculate the average value of an array by using pointers.
We'll cover the following
Problem Statement
In this exercise, you have to 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
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy