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 / .::get lost::.

#include<stdio.h>
#include<conio.h>

void 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);
getch();
}

Is This Answer Correct ?    24 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain what is fifo?

1066


Can a pointer be null?

1018


What is zero based addressing?

1161


What is atoi and atof in c?

1082


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

1107


why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???

1959


What is pass by reference in c?

1183


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

1064


What is time null in c?

1069


What is header file in c?

1062


What is strcmp in c?

1109


Why do we use stdio h and conio h?

1078


What is clrscr ()?

1103


How can I read in an object file and jump to locations in it?

1025


Under what circumstances does a name clash occur?

1194