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 are the types of pointers in c?

1078


How many types of arrays are there in c?

1083


Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.

2124


How can you check to see whether a symbol is defined?

1140


What is meant by type specifiers?

1182


What is modeling?

1096


Wt are the Buses in C Language

3262


What is wrong with this code?

1241


Explain the meaning of keyword 'extern' in a function declaration.

1203


Describe the difference between = and == symbols in c programming?

1449


What is the use of printf() and scanf() functions?

1188


How can a number be converted to a string?

1391


Is c call by value?

1076


What is d'n in c?

1174


Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent

1871