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[j];
a[j]=temp;
}
}
printf("The smallest element is %d",a[0]);
getch();
}

Is This Answer Correct ?    26 Yes 28 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is c platform dependent?

1100


Is main a keyword in c?

1145


What is the size of empty structure in c?

1095


Explain about the functions strcat() and strcmp()?

1062


How do I create a directory? How do I remove a directory (and its contents)?

1179


What is a char c?

1052


What is the difference between formatted&unformatted i/o functions?

1065


Why is c called c?

1035


Which driver is a pure java driver

1632


which type of aspect you want from the student.

2171


What is structure in c language?

1185


Is linux written in c?

1046


Why #include is used in c language?

1059


the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

2690


Is null valid for pointers to functions?

1190