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 / atul kumar

#include<iostream.h>
void main()
{
int a, b[4]=[1,2,3,4];
a[0]=b[0];
for(i=1;i<=5;i++)
{
if(a>b[i])
{
a=b[i];
}
}
cout<<"smallest num"<<a;
}

Is This Answer Correct ?    7 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

4-Take two sets of 5 numbers from user in two arrays. Sort array 1 in ascending and array 2 in descending order. Perform sorting by passing array to a function mySort(array, sortingOrder). Then multiply both the arrays returned from function, using metric multiplication technique in main. Print result in metric format.

2179


Is main a keyword in c?

1126


What is c language & why it is used?

1102


Write a program to show the change in position of a cursor using c

1047


What is the acronym for ansi?

1043


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

1118


How would you use the functions fseek(), freed(), fwrite() and ftell()?

1161


What are different types of pointers?

1065


Can we declare function inside main?

997


How does #define work?

1062


What is malloc and calloc?

1050


What is 2 d array in c?

1017


How to find a missed value, if you want to store 100 values in a 99 sized array?

1404


Where static variables are stored in memory in c?

990


Where are local variables stored in c?

1034