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

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