program to find a smallest number in an array
Answer Posted / suse
main()
{
int a[20],n,i,s;
scanf("%d,%d",&n,&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);
}
| Is This Answer Correct ? | 5 Yes | 7 No |
Post New Answer View All Answers
What are the properties of union in c?
What is the -> in c?
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
Explain what are the advantages and disadvantages of a heap?
Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
Give differences between - new and malloc() , delete and free() ?
What is the acronym for ansi?
Explain can the sizeof operator be used to tell the size of an array passed to a function?
What is the maximum no. of arguments that can be given in a command line in C.?
What is the advantage of c?
What are # preprocessor operator in c?
Explain the use of 'auto' keyword in c programming?
Write a code to generate divisors of an integer?
When do we get logical errors?