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

main()
{
int a[20],n,i,s;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&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 ?    138 Yes 57 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Q.1 write aprogram to stack using linklist o insert 40 items? Q.2 write a program to implement circular queue with help of linklist?

2214


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

2223


What are the two forms of #include directive?

1218


Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.

2018


What is huge pointer in c?

1135


What is a stream?

1192


Is c still relevant?

1138


a c code by using memory allocation for add ,multiply of sprase matrixes

2861


Explain how can I convert a string to a number?

1145


How do we make a global variable accessible across files? Explain the extern keyword?

1932


What's the difference between constant char *p and char * constant p?

1191


The difference between printf and fprintf is ?

1340


Explain what is the benefit of using enum to declare a constant?

1130


c program to compute AREA under integral

2466


How can you determine the maximum value that a numeric variable can hold?

1297