Functions and Recursions – Arithmetic – Problem #12
IIT Kharagpur CS10001 / CS11001 Programming and Data Structures Lab Question Archive
Difficulty: easy
Problem Statement
Write a function int arrayMax(int A[], int n), which takes as input an integer array A[], and the number of elements in the array n (<100). The function returns the value of maximum element of the array. Write a main program, to first read n, and then read A[] element by element. Next call the function arrayMax and print the value of the maximum element of the array A[].