qsort not working c program : <p>I am trying to sort an array of names via qsort.</p>

<p>This is my code</p>

<pre><code>#include&lt;stdio.h&gt;
#include&lt;string.h&gt;
#include&lt;stdlib.h&gt;

int myCompare (const void * a, const void * b ) {

return *(char*)a - *(char*)b;
}


int main(void) {

int i;
char fileArr[] = {"inputbv", "inputa","inputzef",};

int stringLen = sizeof(fileArr) / sizeof(char *);

qsort(fileArr, stringLen, sizeof(char *), myCompare);

for (i=0; i&lt;stringLen; ++i)
    printf("%d: %s\n", i, fileArr[i]);
}
</code></pre>

<p>This code doesn't print anything at the end. It just ends so it seems like it deletes the entries in the char array</p>
