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

Explain what are reserved words?

639


Write a program with dynamically allocation of variable.

607


Can you explain the four storage classes in C?

646


How to write a code for implementing my own printf() and scanf().... Please hep me in this... I need a guidance... Can you give an coding for c... Please also explain about the header files used other than #include...

4909


Why ca not I do something like this?

592






Explain spaghetti programming?

685


Does c have an equivalent to pascals with statement?

578


An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?

676


Describe the order of precedence with regards to operators in C.

637


hw can we delete an internal node of binary search tree the internal node has child node..plz write progarm

1635


What is the -> in c?

591


Describe newline escape sequence with a sample program?

661


What are c identifiers?

631


please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com

1333


How many levels deep can include files be nested?

655