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 down the program to sort the array.

Answer Posted / ashutosh shashi

for(i=0;i<n-1;i++)
{
for(j=0;j<n-i-1;j++)
{
if(arr[j] >a[j+1])
{
temp=arr[j];
arr[j]=arr[j+1];
arr[j+1]=temp;
}
}
}

Is This Answer Correct ?    15 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of macro in C language?

1127


What is ambagious result in C? explain with an example.

2646


Are the expressions * ptr ++ and ++ * ptr same?

1168


Describe static function with its usage?

1222


What is a rvalue?

1211


Explain the difference between null pointer and void pointer.

1096


What would happen to X in this expression: X += 15; (assuming the value of X is 5)

1959


Can the size of an array be declared at runtime?

1099


What is difference between stdio h and conio h?

1394


Why is this loop always executing once?

1067


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

1243


What are pointers in C? Give an example where to illustrate their significance.

1237


Do you have any idea about the use of "auto" keyword?

1095


How can a process change an environment variable in its caller?

1195


What does %2f mean in c?

1232