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
Is c object oriented?
When should you not use a type cast?
What is #include stdlib h?
What’s the special use of UNIONS?
Explain the advantages of using macro in c language?
show how link list can be used to repersent the following polynomial i) 5x+2
The file stdio.h, what does it contain?
What are formal parameters?
What is function prototype in c language?
What is an auto variable in c?
What is self-referential structure in c programming?
What are header files in c?
Explain what are multidimensional arrays?
What is a constant?
What are different types of operators?