Exercise 1: Finding Average in Array

Let's calculate the average value of an array by using pointers.

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.

Continue your learning journey with a 14-day free trial.

By signing up, you agree to Educative's Terms of Service and Privacy Policy