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

What is the use of ?: Operator?

1140


List the difference between a "copy constructor" and a "assignment operator"?

1019


Hai what is the different types of versions and their differences

1944


What does #pragma once mean?

1166


What is function pointer c?

1117


Explain what are the different data types in c?

1225


Where register variables are stored in c?

970


What does it mean when the linker says that _end is undefined?

1099


Why do we use int main instead of void main in c?

1153


What is the difference between Printf(..) and sprint(...) ?

1543


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

1173


A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile

1099


What are the types of data types and explain?

1091


what is the function of pragma directive in c?

1125


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1091