Do you need to use recursion?
You can't print a message every time you increment cnt, or you'll get something like
Code:
There are 1 BILL
There are 2 BILL
There are 3 BILL
. . . assuming the rest of the code works properly. Which it won't.
Code:
if(strcmp(array[i],array[++i]))
I'm pretty sure that's undefined behaviour, and you probably want ==0 anyway.
Code:
char strngs[100][20]={"BILL","BILL","BILL","JACK","JACK","KEN"};
This works as well, and you save a lot of space.
Code:
char *strngs[100]={"BILL","BILL","BILL","JACK","JACK","KEN"};
You just can't modify the strings, that's all.
I think you need to re-think the logic behind your code. How would you determine duplicates? Maybe start with the first name, search for the strings that match it, and then continue on with the second name, and so on. You'd have to set a string to "" or something once you counted it, or you'd count every string more than you wanted to.