#include <stdio.h>
int largest(int []);
int largest(int arr[5])
{
int l,i;
l = arr[0];
for(i=1;i<5;i++)
{
if (arr[i] > l)
{
l = arr[i];
}
else ;
//printf(“%d”,l);
}
return l;
}
int main()
{
int i, max;
int arr[5];
printf(“Enter Elements of array:\n”);
for(i=0;i<5;i++)
{
scanf(“%d”, &arr[i]);
}
for(i=0;i<5;i++)
{
printf(“Array->%d of %d\n:”,i,arr[i]);
}
max = largest(arr);
printf(“largest element is %d\n:”, max);
}
“largest_func.c” 38L, 476C 33,3-17 44%