The functions in conio.h are non-standard and not supported by very many compilers. Just a warning because your teacher may not be able to compile your program if he/she uses a compiler that does not support those functions. Most new programmers should not use them so that you learn the generally accepted way to program.
>>char names[100][20] ={ 10 };
what is the significance of 10? why not simply initialize it to 0 like most programmers do?
>>char tmpName[50] = {40};
ditto
>>tmpName[0] = 40;
tmpName is a character array of 40 characters, not an array of pointers. Why are you setting the first element of tempName to 40? What good will that do? _cgets() will just ignore it anyway and fill the buffer with whatever you type, even if you type too many characters. fgets() is a better (and standard) function because it will not overflow the input buffer.
fgets(tmpName,sizeof(tmpName), stdin);
If function mystrcmp() is going to sort the array, then you should name the function that is more descriptive of its true purpose. It contains many uninitialized variables and array. what is the purpose of
word array? It isn't initiailized to anything but yet you are attempting to sort it.
There are several variations of the bubble sort, here is the one I use probably because it was the first one I learned. Using the two parameters to the function you posted:
int i,j;
for(i = 0; i < counter-1; i++)
{
char hold[20];
for(j = (i+1); j < counter; j++)
{
if( strcmp(words[i],words[j]) < 0)
{
strcpy(hold,words[i]);
strcpy(words[i], words[j]);
strcpy(words[j],hold);
}
}
}