int main()
{
int a;
printf("Enter the length of array ");
scanf("%d",&a);
int arr[a],i,j;
printf("Enter the array elements ");
for(i=0;i<a;i++)
scanf("%d",&arr[i]);
for(i=0;i<a;i++)
{
if(arr[i]>arr[i+1])
{
j=arr[i];
arr[i]=arr[i+1];
arr[i+1]=j;
}
}
printf("Largest element in the array is ");
printf("%d",arr[a-1]);
include
int main() { int a; printf("Enter the length of array "); scanf("%d",&a);
}