Returns First Repeating Character from Array

Ram Pothuraju
This program is to Returns first repeating character from inputted array . 

This program can be modified as to accept user input and also be made in C++ or C Language.

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

 printf("\nFirst Non repeating character Array is: %c\n",removeDuplicates(s,6));

char removeDuplicates(char arr[],int n)
 int i=0,j,cnt,flag=1;
 char c;
 { if (cnt==i){}
  return c;

Post a Comment


Post a Comment (0)