title: convert pointer to pointer to void pointer
body: <p>When I'm learning to use qsort to sort an array of string, there is a question puzzled me.
  For example, to sort the following <code>s</code></p>
  
  <pre><code> char *s[] = {
                     "Amit",
                     "Garima",
                     "Gaurav",
                     "Vaibhav"
                  };
  </code></pre>
  
  <p>To use the qsort, you must provide a comparison function like the
  following function <code>cstring_cmp</code> I guess in the qsort function, the type of parameter to be passed to the function <code>cstring_cmp</code> is <code>char**</code>. How to convert a <code>char**</code> to a <code>void*</code>? Why can we convert a <code>char**</code> to a <code>void*</code>?</p>
  
  <pre><code>    int cstring_cmp(const void *a, const void *b)
      {
          const char **ia = (const char **)a;
          const char **ib = (const char **)b;
          return -strcasecmp(*ia, *ib);
          /* return the negative of the normal comparison */
      }
  </code></pre>