Thursday, July 30, 2009

In c, how to write a code to sort one field based on another?

for example, i have two fields id and value.....


id value


1 13


2 50


3 12


4 19


I shoud get like this


id value


2 13


4 50


1 12


3 19


I mean i need to rearrange id based on value(in ascending order).


I have an array for each id and value..... help me to code in c....

In c, how to write a code to sort one field based on another?
Use the Bubble sort method.


http://www.metalshell.com/view/source/10...





If you are writing a code, people will might you in case of any problem.


Don't ask for code here (there are many sites in the Internet where free codes are available). The reason is, you end up not learning it.
Reply:Use the qsort() function http://www.cppreference.com/stdother/qso...
Reply:Hema this link might help you





http://www.google.co.uk/search?hl=en%26amp;q=f...
Reply:For homework help there are better websites like http://getafreelnacer.com/


No comments:

Post a Comment