title: From the code below, I would like to only have 1 of each letter. For e.g. 'send more money' should become sendmory. How would I achieve this?
body: <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;string.h&gt;
  
  int main(int argc, char *argv[])
  {
      if (argc &lt; 2)
      {
          printf(&quot;USAGE: &lt;porgram name&gt; &lt;word sum&gt;&quot;);
          return 1;
      }
  
  
      for (int i = 1; i &lt; argc; i++)
      {
          printf(&quot;%s\n&quot;, argv[i]); //prints the command line input
      }
  
      return 0;
   }
  </code></pre>
  <p>Would i set the argv to a seperate array or would i just check the argv and if so, how?</p>
  <p>from comment:<br />
  This is where i have gotten so far and the result is correct. Only problem is that i dont know how to get this result from the command line(argv)</p>
  <pre><code>char str[100];
  int i, j, k;
  printf(&quot;\n Please Enter any String : &quot;);
  scanf(&quot;%s&quot;, str);
  for(i = 0; i &lt; strlen(str); i++) {
      for(j = i + 1; str[j] != '\0'; j++) {
          if(str[j] == str[i]) {
              for(k = j; str[k] != '\0'; k++) {
                  str[k] = str[k + 1];
              }
          }
      }
  }
  </code></pre>