Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Implementing RANK function in C

Status
Not open for further replies.

himridul

Programmer
Jun 23, 2003
62
US
Hi All,

Is there any function in C which will return the RANK of an array ( like Oracle RANK Function ) .

Eg :

Array[0] = 121
Array[1] = 122
Array[2] = 122
Array[3] = 125
Array[4] = 125
Array[5] = 126

It will return like
Array[0] ----> RANK
121 ----> 1
122 ----> 2
122 ----> 2
125 ----> 3
125 ----> 3
126 ----> 4

Any help will be appreciated . Thanks in Advance .

Mridul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top