two dimensional array

 
The calculated values of symbol's volatility are placed in an array volatility[26].As symbols are string they are indexed and placed in an array idx[25]. but I do not know how to create a two dimensional array with volatility value as 1st element and index value as 2nd element so that I can sort the first dimension of the array in a descending mode.

any help will be much appreciated.
 

one is a double, one is a string, you can't use 2D.

you have to keep both arrays independent and write your own sort swapping both.

Or alternately, create an index array

string pair[26] = ...
double vola[26] = ...
    int order[26];
    for (int kk=0; kk<26; kk++) {
        for (int ii=kk; ii>0 && vola[order[ii-1]] > vola[kk]; ii--) {
            order[ii]=order[ii-1];  // kk   vola[kk] order[kk]   vola[order[kk]]
        }                           // 0    3.       1           1.
        order[ii]=kk;               // 1    1.       2           2.
    }                               // 2    2.       0           3.
// pair[order[25]] is the most volatile @ vola[order[25]]