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
explain what is fifo?
Can a pointer be null?
What is zero based addressing?
What is atoi and atof in c?
a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
What is pass by reference in c?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
What is time null in c?
What is header file in c?
What is strcmp in c?
Why do we use stdio h and conio h?
What is clrscr ()?
How can I read in an object file and jump to locations in it?
Under what circumstances does a name clash occur?