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
What does %c mean in c?
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
How do you use a 'Local Block'?
Can we access array using pointer in c language?
How does normalization of huge pointer works?
What does the format %10.2 mean when included in a printf statement?
Why pointers are used?
WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER
Explain a file operation in C with an example.
write a C program: To search a file any word which starts with ?a?. If the word following this ?a? starts with a vowel.Then replace this ?a? with ?a? with ?an?. redirect with the output onto an output file.The source file and destination file are specified by the user int the command line.
What is merge sort in c?
Explain what does the characters 'r' and 'w' mean when writing programs that will make use of files?
Tell me can the size of an array be declared at runtime?
What is the difference between char array and char pointer?
How can I remove the trailing spaces from a string?