If sorting is too complicated then you could also set up an index with one complete pass of the employee array:



int j = 0 , k = 0;
for (i = 0; i < whatever; i++) {
if (tolower...