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 a program to sort the elements in a given array in c
language

Answer Posted / naga tirupathi rao

#include<stdio.h>
#include<conio.h>
main()
{
int a[25],i,n,sum=0;
clrscr();
prinf("enter the size of array");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
printf("element%d=",i);
scanf("%d",&a[i]);
sum=sum+a[i];
}
printf("ascending orderis:");
for(j=0;j<=sum;j++)
{
for(i=1;i<=n;i++)
{
if(j==a[i])
printf("%d",j);
}
}
getch();
}

Is This Answer Correct ?    22 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the meaning of && in c?

961


What is a good data structure to use for storing lines of text?

1032


How can you draw circles in C?

1097


What are high level languages like C and FORTRAN also known as?

1105


What is void main () in c?

1150


show how link list can be used to repersent the following polynomial i) 5x+2

2186


What is the size of structure pointer in c?

1015


Write a program to identify if a given binary tree is balanced or not.

1089


Explain what is page thrashing?

1052


I have a varargs function which accepts a float parameter?

994


What is p in text message?

933


What are the ways to a null pointer can use in c programming language?

1073


What is external variable in c?

1008


What is the purpose of sprintf() function?

1052


Explain main function in c?

1036