Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

program to find a smallest number in an array

Answer Posted / belsia

void main()
{
int a[10];
for(i=0;i<10;i++)
scanf("%d",&a[i]);
for(i=0;i<10;i++)
{
if(a[i]>a[i+1])
{
temp=a[i];
a[i]=a[i+1];
a[i+1]=temp;
}
}
printf("The smallest element is %d",a[0]);
getch();
}

Is This Answer Correct ?    7 Yes 17 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is fortran still used today?

1150


Explain what is a 'locale'?

1130


What does %d do in c?

1010


What is the concatenation operator?

1210


What is a stream water?

1283


Is it fine to write void main () or main () in c?

1077


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

1127


Is there any data type in c with variable size?

1150


How can I call a function with an argument list built up at run time?

1287


How do you define a function?

1077


What is string function in c?

1049


Is c procedural or functional?

1096


Can a variable be both const and volatile?

1190


What is the sizeof () operator?

1134


How does normalization of huge pointer works?

1230