Um.
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:
#include<stdio.h>
main()
{
int i;
char string[]= "hello";
int len=strlen(string);
char *first=string;
char *second=string+1;
for (i = 0; i < len - 1; i++)
{
if(*first==*second)
{
printf("A duplicate found\n");
}
first++;
second++;
}
}