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
What is the sizeof () a pointer?
What is a node in c?
Why is a semicolon (;) put at the end of every program statement?
What would be an example of a structure analogous to structure c?
Explain how can I remove the trailing spaces from a string?
When is the “void” keyword used in a function?
Is Exception handling possible in c language?
How variables are declared in c?
What is multidimensional arrays
Explain can the sizeof operator be used to tell the size of an array passed to a function?
How do you print an address?
Describe static function with its usage?
What is the use of pointers in C?
How do you use a 'Local Block'?
How many keywords are there in c?