Write a program in C to get the largest element of an array using the function.
#include <stdio.h>
int findLarge(int[],int);
int main()
{
int a[100],a_size,L_Num,i;
printf(“Enter size of array: “);
scanf(“%d”,&a_size);
printf(“Enter the elements into array:\n”);
for(i=0;i<a_size;i++)
scanf(“%d”,&a[i]);
L_Num=findLarge(a,a_size);
printf(“Largest number is: %d\n”,L_Num);
return 0;
}
int findLarge(int a[],int a_size)
{
int i,Large_num;
Large_num=a[0];
for(i=1;i<a_size;i++)
{
if(Large_num<a[i])
Large_num=a[i];
}
return Large_num;
}
Output:
Enter size of array: 5
Enter the elements into array:
142 785 272 274 632
Largest number is: 785
c program to find largest number in an array using function, largest number of an array using function, c program to find largest number in an array, maximum element in an array in c, largest element in array in c, largest number in array in c, program to find largest element in an array, c program to find the largest number in an array, find the largest number in an array in c, maximum number in array in c, write a program to find the largest element in an array, write a program to find the maximum element in an array, c program to find maximum element in array, write a program to find the largest number in an array, write a program to find greatest number in an array, maximum number of array in c, write a program to find largest number in an array, wap to find largest element in an array, c program to find largest element of an array, find largest element in array in c, c program to find largest number, find the maximum number in an array in c, c program to find maximum element in an array, wap to find maximum element in an array, largest number in array c program