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 / suse

main()
{
int a[20],n,i,s;
scanf("%d,%d",&n,&a[i]);
s=a[0];
for(i=0;i<n;i++)
{
if(s>a[i])
{
s=a[i];
}
}
printf("the smallest number is %d",s);
}

Is This Answer Correct ?    5 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the properties of union in c?

1056


What is the -> in c?

1022


An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

1176


Explain what are the advantages and disadvantages of a heap?

1094


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

2301


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

2651


Give differences between - new and malloc() , delete and free() ?

1105


What is the acronym for ansi?

1051


Explain can the sizeof operator be used to tell the size of an array passed to a function?

1080


What is the maximum no. of arguments that can be given in a command line in C.?

1158


What is the advantage of c?

1134


What are # preprocessor operator in c?

1124


Explain the use of 'auto' keyword in c programming?

1125


Write a code to generate divisors of an integer?

1078


When do we get logical errors?

1132