C++ program to remove duplicate characters from string
From the tests we are if we are only looking for repeating chars, not duplicate e.g. we can transform "ABBA" into "ABA"  (and not "AB"). Then we can use something like:

void removeRepeatingChars(char* s){
  if(!s[0]){                  // Check for enpty string
    return;                   // Notning to do per definition 
  }

  int last=0;                 // Store position of last seen character  thats not a duplicate

  for(int i = 1; s[i] ; i++){ // Loop over all characters and
    if(s[i] != s[last]){      // check if current character is not a dupllicate.
      last++;                 // If so increment the position of last non duplicate and 
      s[last] = s[i];         // copy the currentcharacter to this position.
    }                         // Else go to next char.                            
  }  
  s[++last] = '\0';           // Add string terminator at the end.
}


If not you need to store each seen character and add this check so we get something like.

for(int i = 1; s[i] ; i++){ 
  if(s[i] != s[last] &amp;&amp; !sceen[s[i]]){
      last++;
      s[last] = s[i];
      seen[s[i]] = true;
  }
}


Observe that we use that we can modify the string how ever we like on chars we already have checked in order to do the whole operation in place.