Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 the difference between scanf and fscanf?

1248


What are the different file extensions involved when programming in C?

1237


What is main function in c?

1066


What is structure packing in c?

1065


Explain what is the benefit of using #define to declare a constant?

1162


How can I send mail from within a c program?

1012


Explain what are bus errors, memory faults, and core dumps?

1262


What is the difference between a function and a method in c?

1069


What is volatile, register definition in C

1090


Why c is called a middle level language?

1089


What is %s and %d in c?

1024


What happens if you free a pointer twice?

1054


What is the use of a semicolon (;) at the end of every program statement?

1479


Explain how can I write functions that take a variable number of arguments?

1063


What is indirection? How many levels of pointers can you have?

1117