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

Is c object oriented?

975


When should you not use a type cast?

1129


What is #include stdlib h?

1112


What’s the special use of UNIONS?

1155


Explain the advantages of using macro in c language?

1006


show how link list can be used to repersent the following polynomial i) 5x+2

2317


The file stdio.h, what does it contain?

1173


What are formal parameters?

1131


What is function prototype in c language?

1040


What is an auto variable in c?

1246


What is self-referential structure in c programming?

1226


What are header files in c?

1087


Explain what are multidimensional arrays?

1083


What is a constant?

1070


What are different types of operators?

1047