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
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.
Is main a keyword in c?
What is c language & why it is used?
Write a program to show the change in position of a cursor using c
What is the acronym for ansi?
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
How would you use the functions fseek(), freed(), fwrite() and ftell()?
What are different types of pointers?
Can we declare function inside main?
How does #define work?
What is malloc and calloc?
What is 2 d array in c?
How to find a missed value, if you want to store 100 values in a 99 sized array?
Where static variables are stored in memory in c?
Where are local variables stored in c?