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...

code for bubble sort?

Answer Posted / ansar husain

void main()
{
int A[50];
int n,j,t ;
printf("enter the size of array:=>");
scanf("%d",&n);
printf("enter the %d value in array:=>%d",n);
for(i=0;i<n;i++)
{
for(j=0;j<n;j++)
{
if(A[i]>A[j])
{
i=a[i];
A[i]=a[j];
A[j]=t;
}
}
}
printf("after the shorting:=>\n");
for(i=0;i<n;i++)
{
printf("%d",A[i]);
}
getch();

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

int i=3; this declaration tells the C compiler to a) reserve space in memory to hold the integer value b) associate the name i with this memory location c) store the value 3 at this location d) all the above

1304


What is a constant?

1063


what are the 10 different models of writing an addition program in C language?

1897


Explain what does the format %10.2 mean when included in a printf statement?

1365


What is union and structure?

1126


What is the role of this pointer?

1072


Why is python slower than c?

1089


How can I determine whether a machines byte order is big-endian or little-endian?

1065


Explain the process of converting a Tree into a Binary Tree.

2666


I was asked to write a program in c which when executed displays how many no.of clients are connected to the server.

2372


What is hungarian notation? Is it worthwhile?

1225


Differentiate abs() function from fabs() function.

1018


Why enum is used in c?

962


What is %d called in c?

1234


What is a null pointer in c?

1232