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 are the types of pointers in c?
How many types of arrays are there in c?
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
How can you check to see whether a symbol is defined?
What is meant by type specifiers?
What is modeling?
Wt are the Buses in C Language
What is wrong with this code?
Explain the meaning of keyword 'extern' in a function declaration.
Describe the difference between = and == symbols in c programming?
What is the use of printf() and scanf() functions?
How can a number be converted to a string?
Is c call by value?
What is d'n in c?
Iam a B.Tech graduate and completed my engineering in 2009, from 2005 to 2009 and after that i had done nothing.Now i want to do job and get into BPO field . Friends give me suggestions as what to say in interview... if they ask me that what would you had done ... these many years without doing job ??????? pls urgent