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

What is difference between scanf and gets?

1367


What are different storage class specifiers in c?

1136


What is #include stdio h?

1177


Can you pass an entire structure to functions?

1172


What are the different data types in C?

1245


How can you be sure that a program follows the ANSI C standard?

1655


why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above

1200


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2793


What is a pointer value and address in c?

1179


Explain what are global variables and explain how do you declare them?

1231


hi... can anyone help me to make a two-dimensinal arrays in finding the sum of two elements plzzz. thnx a lot...

1960


Define the scope of static variables.

1191


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

1156


What does c mean in standard form?

1240


What is main () in c?

1115