Return Non Repeating Chars from Array

Ram Pothuraju
This program is to return non-repeating character array from inputted array having repeating characters . 

This program uses the concept of Arrays for the same. And doesnt use built in string functions.
We can modify the same to accept values from the user directly.

char* removeDuplicates(char arr[]);
void main()
 char s[]={'a','b','c','d','e','g','a','b','c','d','e','f'};
 printf("\nInput Array is: %s\n",s);
 printf("\nOutput Array is: %s\n",removeDuplicates(s));

char* removeDuplicates(char arr[])
 int i=0,j,k;


 return arr;


Post a Comment


Post a Comment (0)