Few modifications should do the job.
printf("enter your string :\t");
printf(" %c : %d \n",i,n); }
You'll still be seeing duplicate lines as you are iterating for each characters in the string without checking for duplicates. To overcome this, you can apply logic to have a string with unique characters and that you need to use for outer loop (i).
Check following links for help regarding that-
C program to remove all repeated characters in a string - Codeforwin
Remove all duplicates from a given string - GeeksforGeeks
Hop, it helps :)