Saturday, 30 December 2017

C program to find largest and smallest element in an array

#define MAX 50
int main( )
   int arr[MAX], n, i, max, min;

   printf("Enter the Number of elements");


   printf("Enter elements of array");

   for(i=0; i<n; i++)



   for(i=1; i<n; i++)




   printf("Largest and smallest element is %d %d", max, min);

return 0;


No comments:

Post a Comment

Featured Post

TCS Latest Test Patern ( For On-Campus Drives )

Tata Consultancy Services is software services consulting company whose  headquarter is situated in Mumbai, India. It is the Asia’s larges...