program to find a smallest number in an array
Answer Posted / farhana parvin sunny
#include<stdio.h>
#include<conio.h>
int main(void)
{
int n,i,l,a[10];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
l=a[0];
for(i=0;i<n;i++)
{
if(l>a[i])
{
l=a[i];
}
}
printf("the lowest number is %d",l);
getch();
return 0;
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain the red-black trees?
Is sizeof a keyword in c?
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
what are the 10 different models of writing an addition program in C language?
What are the types of functions in c?
How can I change the size of the dynamically allocated array?
about c language
What is c language in simple words?
What is the use of c language in real life?
How can I avoid the abort, retry, fail messages?
Draw a diagram showing how the operating system relates to users, application programs, and the computer hardware ?
What is the scope of local variable in c?
What does the && operator do in a program code?
Write a code of a general series where the next element is the sum of last k terms.
What is the use of #include in c?