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

typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

1637


What are types of functions?

1036


How can you find the day of the week given the date?

1198


Is calloc better than malloc?

1015


What is indirection? How many levels of pointers can you have?

1124


Describe the steps to insert data into a singly linked list.

1070


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

1221


Which header file is used for clrscr?

1051


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

2321


How are 16- and 32-bit numbers stored?

1284


What library is sizeof in c?

1084


What is NULL pointer?

1089


Why ca not I do something like this?

1009


What is integer constants?

1072


In C language what is a 'dangling pointer'?

1136