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
Why is c platform dependent?
Is main a keyword in c?
What is the size of empty structure in c?
Explain about the functions strcat() and strcmp()?
How do I create a directory? How do I remove a directory (and its contents)?
What is a char c?
What is the difference between formatted&unformatted i/o functions?
Why is c called c?
Which driver is a pure java driver
which type of aspect you want from the student.
What is structure in c language?
Is linux written in c?
Why #include is used in c language?
the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b
Is null valid for pointers to functions?