title: How to remove exceeding duplicate characters in C
body: <p>I'm trying to make a program about keyword cipher, got stuck in removing the keyword(alphabet2) characters from the alphabet characters. It ends up having duplicate characters in the end. How do I remove it?
  My sample keyword is the word helo and it gives me the result of abcdfgijkmnpqrstuvwxyzzzzz.
  How do I remove it?</p>
  
  <pre><code>    char alphabet[] = "abcdefghijklmnopqrstuvwxyz";
      char alphabet2[] = "helo";
  
  for(i = 0 ; i &lt; strlen(alphabet2); i++){
      for(j=0, k=0; j &lt; strlen(alphabet); j++){
          if(alphabet2[i] != alphabet[j]){
              alphabet[k] = alphabet[j];
              k++;
          }
      }
  }
  puts(alphabet);
  </code></pre>