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 string length in c?

1047


Why is it important to memset a variable, immediately after allocating memory to it ?

2031


Explain what is the heap?

1032


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

2160


Why can’t constant values be used to define an array’s initial size?

1343


What is the difference between a free-standing and a hosted environment?

1114


Write a program to use switch statement.

1099


what are # pragma staments?

2010


What are pointers in C? Give an example where to illustrate their significance.

1195


What is data type long in c?

1041


Explain what are its uses in c programming?

1038


Define Spanning-Tree Protocol (STP)

1092


What is the difference between functions abs() and fabs()?

1119


How can I sort a linked list?

1009


What is spaghetti programming?

1097