title: How to sort a 2D array on the basis of a particular index in c/c?
body: <p>Suppose we have a 2D array A :</p>
  
  <pre><code>    A[3][3] = { {1 ,4 ,7},
                  {6 ,2 ,3},
                  {3 ,5 ,5}
                }  
  </code></pre>
  
  <p>I want to sort it about index i (say 1)
  the result should be</p>
  
  <pre><code>    A[3][3] = { {6 ,2 ,3},
                  {1 ,4 ,7},
                  {3 ,5 ,5}
                }  
  </code></pre>
  
  <p>sorting about 0 will lead to</p>
  
  <pre><code>    A[3][3] = { {1 ,4 ,7},
                  {3 ,5 ,5},
                  {6 ,2 ,3}
                }  
  </code></pre>
  
  <p>How to use the sort function to do this ?</p>