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 difference between the expression “++a” and “a++”?

1270


Can a variable be both static and volatile in c?

1080


What are structure members?

1142


how to construct a simulator keeping the logical boolean gates in c

2300


Explain the use of bit fieild.

1196


using only #include and #include Write a program in C that will read an input from the user and print it back to the user if it is a palindrome. The string ends when it encounters a whitespace. The input string is at most 30 characters. Assume the string has no spaces and distinguish between and lowercase. So madam is a palindrome, but MadAm is not a palindrome. Use scanf and %s to read the string. Sample Test: Enter a string: madam madam is a palindrome. Enter a string: 09023 09023 is not a palindrome.

1851


What is identifier in c?

1058


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1133


How do you determine the length of a string value that was stored in a variable?

1170


Explain enumerated types in c language?

1099


What is the difference between text files and binary files?

1391


How many levels of pointers have?

1097


how to count no of words,characters,lines in a paragraph.

4470


while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above

1296


What is the use of f in c?

1029