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
Explain what math functions are available for integers? For floating point?
What are file streams?
When should a type cast be used?
Which header file is essential for using strcmp function?
How are portions of a program disabled in demo versions?
What does dm mean sexually?
What is the heap?
What are conditional operators in C?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
How can you find out how much memory is available?
What is %d called in c?
write a program to copy the string using switch case?
Is javascript based on c?
List the variables are used for writing doubly linked list program.
How is a null pointer different from a dangling pointer?