program to find a smallest number in an array
Answer Posted / belsia
void main()
{
int a[10];
for(i=0;i<10;i++)
scanf("%d",&a[i]);
for(i=0;i<10;i++)
{
if(a[i]>a[i+1])
{
temp=a[i];
a[i]=a[i+1];
a[i+1]=temp;
}
}
printf("The smallest element is %d",a[0]);
getch();
}
| Is This Answer Correct ? | 7 Yes | 17 No |
Post New Answer View All Answers
Is fortran still used today?
Explain what is a 'locale'?
What does %d do in c?
What is the concatenation operator?
What is a stream water?
Is it fine to write void main () or main () in c?
Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?
Is there any data type in c with variable size?
How can I call a function with an argument list built up at run time?
How do you define a function?
What is string function in c?
Is c procedural or functional?
Can a variable be both const and volatile?
What is the sizeof () operator?
How does normalization of huge pointer works?