write the program for maximum of the following numbers?
122,198,290,71,143,325,98

Answer Posted / akhilesh singh

main()
{
int i,j,temp,a[7]={122,198,290,71,143,325,98};
for(i=0;i<=5;i++)
{
for(j=0;j<=6;j++)
{
if(a[j]<a[j+1])
{
temp=a[j];
a[j]=a[j+1];
a[j+1]=temp;
}
}
}
printf("%d",a[0]);
}

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is void c?

571


Can we increase size of array in c?

544


what are enumerations in C

726


Give differences between - new and malloc() , delete and free() ?

614


What does node * mean?

716






What is getche() function?

611


Explain what is meant by high-order and low-order bytes?

637


What is meant by int main ()?

721


Is c procedural or functional?

590


List the variables are used for writing doubly linked list program.

1626


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

1658


How do I swap bytes?

634


What is an auto keyword in c?

645


Can math operations be performed on a void pointer?

592


What is #error and use of it?

681