C Program to Find the Largest Element From an Array

This is a c program to find the largest element from an array. We have used the for loop and if… statement to achieve the program goal. In this program, firstly the user will enter the number of array elements and then the numbers of elements. On the basis of entered array elements, we will find the largest number and displays as output.

Find the largest element of an array in c programming language

Copy the below c program and execute it with the help of c compiler. We have executed this program and added the program output at the below of this page.

Program Output

Enter the number of elements between(1-100): 5
Enter Number 1: 8
Enter Number 2: 5
Enter Number 3: 6
Enter Number 4: 3
Enter Number 5: 19
The largest element is: 19.00

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:

Article Tags: , , , , , , , , ,