C programming code to find minimum value of an array

Share This Topic:

Course Details

Field of Study: Computer Science and Engineering
Course Name: C Programming
Course Description: C programming code to find minimum value of an array

Code
#include<stdio.h>
#include<conio.h>

void main()
{
clrscr();
int x[6]={70,29,3,8,30,76};
int min=x[0];
for(int i=0;i<6;i++)
{
if(x[i] < min)
min=x[i];
}
printf(“Minimum value is %d”,min);
getch();
}

Share this article:
Previous Post: C programming code to add even and odd numbers up to n

December 2, 2014 - In Academics, Computers

Next Post: C programming code to concatenate 2 sorted arrays in ascending order

December 2, 2014 - In Academics, Computers

Related Posts

Leave a Reply

Your email address will not be published.