program to find a smallest number in an array
Answer Posted / asif ali afsar
#include<stdio.h>
#include<conio.h>
void main()
{
int a[10],b,c,n;
clrscr();
printf("How many size you want to Cheah\n");
scanf("%d",&n);
printf("Enter the numbers\n");
for(b=0; b<n; b++)
{
scanf("%d",&a[b]);
}
for(b=0; b<n; b++)
{
if(c<a[b])
{
c=c;
}
else
{
c=a[b];
}
}
printf("smalest no is %d",c);
getch();
}
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What are different types of operators?
What is wrong with this initialization?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
program for reversing a selected line word by word when multiple lines are given without using strrev
if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above
What is an endless loop?
what is ur strangth & weekness
Here is a neat trick for checking whether two strings are equal
why use "return" statement a) on executing the return statement it immediately transfers the control back to the calling program b) it returns the value present in the parentheses return, to the calling program c) a & b d) none of the above
What are the types of pointers in c?
FORMATTED INPUT/OUTPUT functions are a) scanf() and printf() b) gets() and puts() c) getchar() and putchar() d) all the above
a=10;b= 5;c=3;d=3; if(a printf(%d %d %d %d a,b,c,d) else printf("%d %d %d %d a,b,c,d);
in iso what are the common technological language?
What does 2n 4c mean?
Write a program to print fibonacci series without using recursion?