title: c Print out the letters, which were repeatedly in string
body: <p>My function should print out letters which are more than once in string. I have no idea why I get an empty output, or my program 'stops working'. </p>
  
  <pre><code>#include &lt;string.h&gt;
  #include &lt;stdio.h&gt;
  
  void funkcja3 (char []);
  
  int main()
  {
      funkcja3("napnapnaaw");
      return 0;
  }
  
  void funkcja3 (char napis[])
  {
      int i=0,j;
      for(;i&lt;strlen(napis);i++)
      {
          if((napis[i]&gt;='a')&amp;&amp;(napis[i]&lt;='z'))
          {
              int n=0;
              for(j=i+1;j&lt;strlen(napis);j++)
              {
                  if(napis[i]==napis[j])
                  {
                      n++;
                      napis[j]=' ';
                  }
              }
              if(n&gt;0)
              {
                  printf("%c ", napis[i]);
              }
          }
      }
  }
  </code></pre>