First and second are both pointers. You are comparing them to integers? Do you think this is a good idea? What do you expect the result to be?
Instead, replace your while loop with a for loop:
char string= "hello";
for (i = 0; i < len - 1; i++)
printf("A duplicate found\n");