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[j];
a[j]=temp;
}
}
printf("The smallest element is %d",a[0]);
getch();
}
| Is This Answer Correct ? | 26 Yes | 28 No |
Post New Answer View All Answers
What is the use of ?: Operator?
List the difference between a "copy constructor" and a "assignment operator"?
Hai what is the different types of versions and their differences
What does #pragma once mean?
What is function pointer c?
Explain what are the different data types in c?
Where register variables are stored in c?
What does it mean when the linker says that _end is undefined?
Why do we use int main instead of void main in c?
What is the difference between Printf(..) and sprint(...) ?
How do I create a directory? How do I remove a directory (and its contents)?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
What are the types of data types and explain?
what is the function of pragma directive in c?
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?