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[].

Back to Lab Problems
Functions and Recursions/Arithmetic/Problem #12

Lab Problem Statement

Specifications & Problem DetailsIIT Kharagpur PDS Archive
Loading question...

Interactive C Compiler · Problem #12

WASM In-Browser

Runs directly on your machine · Zero remote server dependency

Compiler downloads on first Run (large, saved in your browser after that)
main.cCtrl + Enter to run
1
2
3
4
5
6
7
Input (stdin)given to scanf / cin
Output

Output appears here. Press Run to compile and execute.